{
  "openapi": "3.0.4",
  "info": {
    "title": "Data Hub API",
    "description": "Data Hub API",
    "contact": {
      "name": "Opinum Support",
      "url": "https://support.opinum.com/",
      "email": "support@opinum.com"
    },
    "license": {
      "name": "Privacy Policy",
      "url": "https://www.opinum.com/privacy-policy/"
    },
    "version": "1.7"
  },
  "paths": {
    "/account": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the current users's account",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "displayLevel",
            "in": "query",
            "description": "",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Accounts.AccountDisplayLevel"
            }
          },
          {
            "name": "fieldMask",
            "in": "query",
            "description": "List of fields to be returned. i.e. Name, SmsSettings, ...",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.BaseAccountDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Updates the current users's account",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "fieldMask",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
                }
              }
            }
          }
        }
      }
    },
    "/account/features": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "List of all user features.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/secondaryAccesses": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the list of secondary accesses.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/user/{userId}": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the user information.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Saves the user information.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Deletes the user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/{userId}/claims/add": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Add data pushers claims to an user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The claim to add.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            }
          }
        }
      }
    },
    "/account/user/{userId}/claims/remove": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Remove data pushers claims from an user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The of claims to remove.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/user/{userId}/features": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Get user current features.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Saves the user features.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The features.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/{userId}/lock": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Locks the user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserLock"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserLock"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserLock"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/{userId}/resetpassword": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Resets the user password.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/{userId}/secondaryAccesses": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the user features.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Saves the user features.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The features.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/{userId}/sites": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.SiteAccessModel"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.SiteAccessModel"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.SiteAccessModel"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "UserAccount"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/accounts": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets all current user accounts.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "SubscriptionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.BaseAccountDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/user/active-account/{accountId}": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Set active account for the current user",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The ID of the account",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/claim/{userId}": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the claims.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/user/claims/add": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Adds the claim to an user on the same account.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The claim.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/claims/edit": {
      "put": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Edits a claim of an user on the same account.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The claim.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/claims/remove": {
      "delete": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Removes the claims from an user on the same account.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The claims.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/create": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Create the user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "delayToSendEmail",
            "in": "query",
            "description": "Delay to send registration email in hours (max 72h).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The new user.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/user/register": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Register user",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "invitationToken",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.RegisterUserResult"
                }
              }
            }
          }
        }
      }
    },
    "/account/usermapping": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the account user mapping.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserInfoLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      }
    },
    "/account/usermapping/users": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the account user role user mapping.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserInfoLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      }
    },
    "/account/users": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the account users. (Obsolete)",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchResponse"
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Gets the account users.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserDisplayLevel"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "View ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Search text (search on pseudo, first name, last name and email)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id. (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Claims",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.ClaimFilter"
              }
            }
          },
          {
            "name": "Roles",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "BusinessKeys.Name",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserBusinessKeyName"
            }
          },
          {
            "name": "BusinessKeys.Values",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      }
    },
    "/account/users/account": {
      "post": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Add users on an account i'm allowed on",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AddRemoveUsersToFromAccountBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AddRemoveUsersToFromAccountBody"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AddRemoveUsersToFromAccountBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Remove users from an account i'm allowed on",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AddRemoveUsersToFromAccountBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AddRemoveUsersToFromAccountBody"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AddRemoveUsersToFromAccountBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/users/visibleToMe": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Get all users that are visible to me. On any account i'm allowed on.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserDisplayLevel"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "View ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Search text (search on pseudo, first name, last name and email)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountIds",
            "in": "query",
            "description": "Account Ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "BusinessKeys.Name",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserBusinessKeyName"
            }
          },
          {
            "name": "BusinessKeys.Values",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserVisibleToMe, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      }
    },
    "/account/usersForAccount/{id}": {
      "get": {
        "tags": [
          "UserAccount"
        ],
        "summary": "Ges the users for account.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserInfoViewModel, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      }
    },
    "/account/webhooks": {
      "get": {
        "tags": [
          "Webhook"
        ],
        "summary": "Get account Webhooks.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "description": "Display level.",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookDisplayLevel"
            }
          },
          {
            "name": "EventType",
            "in": "query",
            "description": "Event type",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookEventType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Create account Webhook",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The Webhook",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
                }
              }
            }
          }
        }
      }
    },
    "/account/webhooks/{id}": {
      "put": {
        "tags": [
          "Webhook"
        ],
        "summary": "Update an account Webhook",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Webhook Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The Webhook updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Webhook"
        ],
        "summary": "Delete an account Webhook",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Webhook Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/webhooks/{id}/history": {
      "get": {
        "tags": [
          "Webhook"
        ],
        "summary": "Get the execution histories of an account Webhook.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Webhook Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookHistory"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/account/webhooks/{webhookId}": {
      "patch": {
        "tags": [
          "Webhook"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/webhooks/test": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Sends a webhook configuration for testing.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The configuration of the webhook that you want to test",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookTest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookTest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookTest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/account/webhooks/test/{id}": {
      "get": {
        "tags": [
          "Webhook"
        ],
        "summary": "Gets the result of a webhook test operation.",
        "description": "This method is made to be called in some polling mechanism waiting to get the value after the async operation",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The Id of the test instance that was returned by the create webhook test method",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "The test operation has not yet been executed"
          }
        }
      }
    },
    "/accountConfigurations": {
      "put": {
        "tags": [
          "AccountConfiguration"
        ],
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SectionName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/System.Text.Json.JsonElement"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/System.Text.Json.JsonElement"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/System.Text.Json.JsonElement"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Text.Json.JsonElement"
                }
              }
            }
          }
        }
      }
    },
    "/accountConfigurations/configurations": {
      "get": {
        "tags": [
          "AccountConfiguration"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SectionName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.AccountConfigurationDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accountConfigurations/section": {
      "get": {
        "tags": [
          "AccountConfiguration"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "SectionName",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AccountConfigurationDtos.ConfigurationSectionDto"
                }
              }
            }
          }
        }
      }
    },
    "/accountConfigurations/sections": {
      "get": {
        "tags": [
          "AccountConfiguration"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AccountConfigurationDtos.ConfigurationSectionDto"
                }
              }
            }
          }
        }
      }
    },
    "/accounts": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets all accounts.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Account name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Results page number",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ItemsPerPage",
            "in": "query",
            "description": "Number of items by page",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "FieldMask",
            "in": "query",
            "description": "List of fields to be returned. i.e. Name, SmsSettings, ...",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "SubscriptionId",
            "in": "query",
            "description": "Account SubscriptionId",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "OrganizationId",
            "in": "query",
            "description": "Filter by organization id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create the specified account information.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The account.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Update the specified account.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "fieldMask",
            "in": "query",
            "description": "",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The account.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/accounts/{accountId}": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Delete the specified account.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "description": "The account id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/accounts/{id}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Gets the account.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fieldMask",
            "in": "query",
            "description": "The mask",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Account"
                }
              }
            }
          }
        }
      }
    },
    "/aggregates": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets aggregates.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Gets all Alarms.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "DetailLevel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDetailLevelDto"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Alarm id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "List of alert ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Search on alert name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "VariableId",
            "in": "query",
            "description": "Variable id. [Obsolete(\"Use VariableIds instead\")]",
            "schema": {
              "type": "integer",
              "format": "int32",
              "deprecated": true
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "List of variable ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Source id. [Obsolete(\"Use SourceIds instead\")]",
            "schema": {
              "type": "integer",
              "format": "int32",
              "deprecated": true
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SiteIds",
            "in": "query",
            "description": "List of site ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Thresholds",
            "in": "query",
            "description": "List of alert thresholds types",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType"
              }
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "States.Present",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "States.Acknowledged",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "States.Inhibited",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "States.Uncertain",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "FrequencyType",
            "in": "query",
            "description": "Alarm frequency type. [Obsolete(\"Use FrequencyTypes instead\")]",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
            }
          },
          {
            "name": "FrequencyTypes",
            "in": "query",
            "description": "List of alert types",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
              }
            }
          },
          {
            "name": "Type",
            "in": "query",
            "description": "Alarm type",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType"
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "Filter by view Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "OrderBy",
            "in": "query",
            "description": "Field to order on; Can be combined with Paging.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ActuallyImpactingVariableId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "AlarmTemplateIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Alarm"
        ],
        "summary": "Update Alarm.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Alarm updated",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Alarm"
        ],
        "summary": "Created an Alarm.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The new Alarm",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Alarm"
        ],
        "summary": "Remove an Alarm.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Alarm id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/alarms/{alarmId}": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get Alarm by id. (Obsolete: \"Use GET /alarms?id=YourAlarmId\")",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmId",
            "in": "path",
            "description": "Alarm id",
            "required": true,
            "schema": {
              "pattern": "^(?!(views|templates)$)",
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "put": {
        "tags": [
          "Alarm"
        ],
        "summary": "Update Alarm. (Obsolete: \"Use PUT /alarms\")",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmId",
            "in": "path",
            "description": "Alarm id",
            "required": true,
            "schema": {
              "pattern": "^(?!(views|templates)$)",
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Alarm updated",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
                }
              }
            }
          }
        },
        "deprecated": true
      },
      "delete": {
        "tags": [
          "Alarm"
        ],
        "summary": "Remove an Alarm. (Obsolete: \"Use DELETE /alarms?id=YourAlarmId\")",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmId",
            "in": "path",
            "description": "Alarm id",
            "required": true,
            "schema": {
              "pattern": "^(?!(views|templates)$)",
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "deprecated": true
      }
    },
    "/alarms/{alarmId}/acknowledge": {
      "put": {
        "tags": [
          "Alarm"
        ],
        "summary": "Acknowledge alarm (Obsolete: \"Use PUT /alarms/acknowledge?id=YourAlarmId\")",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmId",
            "in": "path",
            "description": "Alarm id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/alarms/{alarmId}/state": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get current alarm state by alarm id. (Obsolete: \"Use GET /alarms/state?id=YourAlarmId\")",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmId",
            "in": "path",
            "description": "Alarm id",
            "required": true,
            "schema": {
              "pattern": "^(?!(views|templates)$)",
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceDto"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/alarms/acknowledge": {
      "put": {
        "tags": [
          "Alarm"
        ],
        "summary": "Acknowledge alarm",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Alarm id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/aggregationTypes": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get the list of the Alarm aggregations types",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/getDatesAndAggregationPeriods": {
      "post": {
        "tags": [
          "Alarm"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.GetDatesAndAggregationPeriodsDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.GetDatesAndAggregationPeriodsDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.GetDatesAndAggregationPeriodsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.GetDatesAndAggregationPeriodsResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/history": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get alarm status history",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "AlarmIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "AlarmOccurrenceStatuses.Present",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "AlarmOccurrenceStatuses.Acknowledged",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "AlarmOccurrenceStatuses.Inhibited",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "AlarmOccurrenceStatuses.Uncertain",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "MinDate",
            "in": "query",
            "description": "Occurence >= MinDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "MaxDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "OrderByField",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "OrderByDirection",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.OrderByDirection"
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "List of variable ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SiteIds",
            "in": "query",
            "description": "List of site ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/notificationTargets": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get the list of the Alarm notifications targets",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/notificationTriggers": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get the list of the Alarm notification triggers",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/notificationTypes": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get the list of the Alarm notifications types",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/reset": {
      "put": {
        "tags": [
          "Alarm"
        ],
        "summary": "Reset alarms counters",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.ResetAlarmRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.ResetAlarmRequestDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.ResetAlarmRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/alarms/state": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get current alarm state by alarm id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "Alarm id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/templates": {
      "get": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Gets alarm templates satisfying a filter.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "AccountId",
            "in": "query",
            "description": "The account Id (Admin only)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "The list of alarm template Ids to filter",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "A free text that is searched in all alarm template Ids. The text must be a full word",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Thresholds",
            "in": "query",
            "description": "The thresholds to filter",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType"
              }
            }
          },
          {
            "name": "FrequencyTypes",
            "in": "query",
            "description": "The frequency types to filter",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
              }
            }
          },
          {
            "name": "Type",
            "in": "query",
            "description": "The alarm ty to filter",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType"
            }
          },
          {
            "name": "Enabled",
            "in": "query",
            "description": "The enabled state to filter",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Sorting.SortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Sorting.Direction",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.SortingDirection"
            }
          },
          {
            "name": "IncludeInstances",
            "in": "query",
            "description": "If true, the returned alarm templates will contain all alarm instances referring to them",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "States",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousState"
              }
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "Filter by view Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateWithInstancesDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Create an alarm template and one alarm instance on every variables that are elected by the data sources specified in the alarm template.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "whatIf",
            "in": "query",
            "description": "If true, the response will report the number of alarm instances that will be created when processed",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "asynchronous",
            "in": "query",
            "description": "If true, the call will return as soon as the template creation process is started, not waiting for the end of the operations",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The alarm template to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.CreatedAlarmTemplateDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Update an alarm template and all alarm instances that refer to this alarm template.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "overrideFrozenInstances",
            "in": "query",
            "description": "if true, will force update the Frozen instances",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "whatIf",
            "in": "query",
            "description": "If true, the response will report the number of alarm instances that will be updated when processed",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "asynchronous",
            "in": "query",
            "description": "If true, the call will return as soon as the template update process is started, not waiting for the end of the operations",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The alarm template to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.UpdatedAlarmTemplateDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Delete an alarm template and all alarm instances that refer to this alarm template.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmTemplateId",
            "in": "query",
            "description": "The alarm template id to delete.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatIf",
            "in": "query",
            "description": "If true, the response will report the number of alarm instances that will be deleted when processed",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "asynchronous",
            "in": "query",
            "description": "If true, the call will return as soon as the template deletion process is started, not waiting for the end of the operations",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.DeletedAlarmTemplateDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/templates/createResult": {
      "get": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Get the state of an asynchronous alarm template creation operation.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmTemplateId",
            "in": "query",
            "description": "The alarm template id to which the state request applies",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.CreatedAlarmTemplateDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/templates/deleteResult": {
      "get": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Get the state of an asynchronous alarm template deletion operation.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmTemplateId",
            "in": "query",
            "description": "The alarm template id to which the state request applies",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.DeletedAlarmTemplateDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/templates/state": {
      "get": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Get the asynchronous state of an alarm template operation.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmTemplateId",
            "in": "query",
            "description": "The alarm template id to which the state request applies",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousOperationStateDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/templates/updateResult": {
      "get": {
        "tags": [
          "AlarmTemplate"
        ],
        "summary": "Get the state of an asynchronous alarm template update operation.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alarmTemplateId",
            "in": "query",
            "description": "The alarm template id to which the state request applies",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.UpdatedAlarmTemplateDto"
                }
              }
            }
          }
        }
      }
    },
    "/alarms/thresholds": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get the list of the Alarm thresholds",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/types": {
      "get": {
        "tags": [
          "Alarm"
        ],
        "summary": "Get the list of the Alarm type",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/views": {
      "post": {
        "tags": [
          "AlarmView"
        ],
        "summary": "Create a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "AlarmView"
        ],
        "summary": "Get all alarms.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Ids",
            "in": "query",
            "description": "List of views Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "View Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeTemporary",
            "in": "query",
            "description": "If temporary views are includes.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "View name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User Id (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "View siteId",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "TemplateViews",
            "in": "query",
            "description": "If it is an alarm template view",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alarms/views/{id}": {
      "delete": {
        "tags": [
          "AlarmView"
        ],
        "summary": "Delete a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Views Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateViews",
            "in": "query",
            "description": "If this is a template view",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/alarms/views/{viewId}": {
      "put": {
        "tags": [
          "AlarmView"
        ],
        "summary": "Update a view",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "description": "View Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto"
                }
              }
            }
          }
        }
      }
    },
    "/alerts": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Gets all alerts.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Alert id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "List of alert ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Search on alert name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "VariableId",
            "in": "query",
            "description": "Variable id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Source id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SiteIds",
            "in": "query",
            "description": "List of site ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Thresholds",
            "in": "query",
            "description": "List of alert thresholds types",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertThresholdType"
              }
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "States",
            "in": "query",
            "description": "List of alert states",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertState"
              }
            }
          },
          {
            "name": "Type",
            "in": "query",
            "description": "Alert type",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertType"
            }
          },
          {
            "name": "Types",
            "in": "query",
            "description": "List of alert types",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertType"
              }
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "Filter by view Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeHistoryCount",
            "in": "query",
            "description": "Add the count of new alert history.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Alert"
        ],
        "summary": "Created an alert.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The new alert",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/alerts/{alertId}": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get alert by id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "description": "Alert id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Alert"
        ],
        "summary": "Update alert.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "description": "Alert id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Alert updated",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.Alert"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Alert"
        ],
        "summary": "Remove an alert.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "description": "Alert id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/alerts/aggregationTypes": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get the list of the alert aggregations types",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/notificationTargets": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get the list of the alert notifications targets",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/notificationTypes": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get the list of the alert notifications types",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/notificationTypeTargetMapping": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get the list of the alert aggregations targets",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertNotificationTarget"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/occurrences": {
      "get": {
        "tags": [
          "AlertOccurrence"
        ],
        "summary": "Get all alert histories.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "From",
            "in": "query",
            "description": "History from date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "To",
            "in": "query",
            "description": "History to date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "description": "History status.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertOccurrenceStatus"
              }
            }
          },
          {
            "name": "AlertIds",
            "in": "query",
            "description": "List of alert Id.",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertOccurrence"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/occurrences/status": {
      "put": {
        "tags": [
          "AlertOccurrence"
        ],
        "summary": "Update alert statuses",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertOccurrenceUpdateRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertOccurrenceUpdateRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertOccurrenceUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/alerts/occurrences/statuses": {
      "get": {
        "tags": [
          "AlertOccurrence"
        ],
        "summary": "Get the list of alert statues",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/statuses": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get the list of the alert states",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/thresholds": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get the list of the alert thresholds",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/types": {
      "get": {
        "tags": [
          "Alert"
        ],
        "summary": "Get the list of the alert type",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/views": {
      "post": {
        "tags": [
          "AlertView"
        ],
        "summary": "Create a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "AlertView"
        ],
        "summary": "Get all alerts.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Ids",
            "in": "query",
            "description": "List of views Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "View Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeTemporary",
            "in": "query",
            "description": "If temporary views are includes.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "View name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User Id (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/alerts/views/{id}": {
      "delete": {
        "tags": [
          "AlertView"
        ],
        "summary": "Delete a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Views Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/alerts/views/{viewId}": {
      "put": {
        "tags": [
          "AlertView"
        ],
        "summary": "Update a view",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "description": "View Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AlertViewDto"
                }
              }
            }
          }
        }
      }
    },
    "/connectors/auth": {
      "get": {
        "tags": [
          "Connector"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
            }
          },
          {
            "name": "serviceKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serviceProvider",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dashboards/": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Gets all dashboards.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "SiteId",
            "in": "query",
            "description": "Site Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Source Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "List of dashboard Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "MetadataFilters",
            "in": "query",
            "description": "Metadata filter ({'path.subPath':intValue} or {'path.subPath':'stringValue'}",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Create a dashboard.",
        "description": "Allowed for: ALL USERS",
        "requestBody": {
          "description": "The new dashboard.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
                }
              }
            }
          }
        }
      }
    },
    "/dashboards/{id}": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Get a dashboard by id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The dashboard id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Update a dashboard.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The dashboard id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The dashboard updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Remove a dashboard.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The dashboard id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dashboards/{id}/logo": {
      "post": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Upload a public dashboard logo.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The dashboard id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "Logo file",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Get the public dashboard logo on base64.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The dashboard id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Remove public dashboard logo.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The dashboard id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dashboards/legend": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Get the list of DataSourceLegendTypes.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "The type request.",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.GetDataSourceLegendType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dashboards/trendlinetypes": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "summary": "Get the list of trend line types.",
        "description": "Allowed for: ALL USERS",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/data": {
      "get": {
        "tags": [
          "Data"
        ],
        "summary": "Gets data.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "description": "Data display level (Chose discriminant columns).",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.DataDisplayLevel"
            }
          },
          {
            "name": "Granularity",
            "in": "query",
            "description": "The granularity of the output data.\nThis parameter can't be set to raw if an aggregation is specified.",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Granularity"
            }
          },
          {
            "name": "From",
            "in": "query",
            "description": "The start date (included in the date range). \nThis date is considered to be expressed in the TimeZone defined by \"TimeZoneId\" or \"UseReportingTimezone\"",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "To",
            "in": "query",
            "description": "The end date (included in the date range if IncludeToBoundary is set). \nThis date is considered to be expressed in the TimeZone defined by \"TimeZoneId\" or \"UseReportingTimezone\"",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "IncludeToBoundary",
            "in": "query",
            "description": "If set, include \"To\" date in date range.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Source Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "VariableId",
            "in": "query",
            "description": "Variable Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "List of variable ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "VariableTypeId",
            "in": "query",
            "description": "Variable type id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableTypeIds",
            "in": "query",
            "description": "List of variable type ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Aggregation",
            "in": "query",
            "description": "Aggregation \nThis parameter can't be set if the granularity is raw.",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
            }
          },
          {
            "name": "Aggregations",
            "in": "query",
            "description": "A list of aggregations.\nThis parameter can't be set if the granularity is raw.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
              }
            }
          },
          {
            "name": "UseReportingTimezone",
            "in": "query",
            "description": "If set, the API converts all dates to the variable's parent site TimeZone.\nThis parameter can't be set if TimeZoneId is specified.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "TimeZoneId",
            "in": "query",
            "description": "If set, the API converts all dates to the specified TimeZoneId. A TimeZoneId is a string corresponding to the name of the time zone.\nThe list of time zones is available at https://docs.microsoft.com/en-us/previous-versions/windows/embedded/gg154758(v=winembedded.80) (BCL) and at https://www.iana.org/time-zones (IANA/TZDB).\nThis parameter can't be set if UseReportingTimezone is set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "The account restricting the data extraction (ADMIN ONLY).\nThis parameter can't be set if IncludeAllAccounts is set.\nFor non ADMIN users, the account Id is retrieved from the user's credentials.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PagingOrder",
            "in": "query",
            "description": "The pading sorting direction (ASC or DESC).",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.OrderByDirection"
            }
          },
          {
            "name": "TargetUnits",
            "in": "query",
            "description": "List of target units (unit or symbol).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "UnitTransformation",
            "in": "query",
            "description": "If data units will be transform to the first compatible target unit.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.ValueData"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Data"
        ],
        "summary": "Gets data (POST).",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.PublicDataFilter"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.PublicDataFilter"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.PublicDataFilter"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.ValueData"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Data"
        ],
        "summary": "Delete datapoints",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DeleteDataPointsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DeleteDataPointsRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DeleteDataPointsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DeleteDataPointsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/data/queryable": {
      "get": {
        "tags": [
          "Data"
        ],
        "summary": "Gets data and apply a custom aggregation on it",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Granularity",
            "in": "query",
            "description": "The granularity of the output data.\nThis parameter can't be set to raw if an aggregation is specified.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataControllerDtos.Granularity"
            }
          },
          {
            "name": "From.AsIso8601",
            "in": "query",
            "description": "ISO8601 representation (YYYY-MM-DDThh:mm:ss[.mmm]TZD) of the date/time\nWhere:\n  YYYY = four-digit year\n  MM = two-digit month(eg 03=March)\n  DD = two-digit day of the month(01 through 31)\n  T = a set character indicating the start of the time element\n  hh = two digits of an hour(00 through 23, AM/PM not included)\n  mm = two digits of a minute(00 through 59)\n  ss = two digits of a second(00 through 59)\n  mmm = three digits of a millisecond(000 through 999)\n  TZD = time zone designator(Z or +hh:mm or -hh:mm), the + or - values indicate how far ahead or behind a time zone is from the UTC(Coordinated Universal Time) zone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "From.AsEpoch",
            "in": "query",
            "description": "The number of seconds that have elapsed since 1970-01-01T00:00:00Z",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "To.AsIso8601",
            "in": "query",
            "description": "ISO8601 representation (YYYY-MM-DDThh:mm:ss[.mmm]TZD) of the date/time\nWhere:\n  YYYY = four-digit year\n  MM = two-digit month(eg 03=March)\n  DD = two-digit day of the month(01 through 31)\n  T = a set character indicating the start of the time element\n  hh = two digits of an hour(00 through 23, AM/PM not included)\n  mm = two digits of a minute(00 through 59)\n  ss = two digits of a second(00 through 59)\n  mmm = three digits of a millisecond(000 through 999)\n  TZD = time zone designator(Z or +hh:mm or -hh:mm), the + or - values indicate how far ahead or behind a time zone is from the UTC(Coordinated Universal Time) zone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "To.AsEpoch",
            "in": "query",
            "description": "The number of seconds that have elapsed since 1970-01-01T00:00:00Z",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "IncludeToBoundary",
            "in": "query",
            "description": "If set, include \"To\" date in date range.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "List of variable ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "VariableTypeIds",
            "in": "query",
            "description": "List of variable type ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Aggregation",
            "in": "query",
            "description": "Aggregation \nThis parameter can't be set if the granularity is raw.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataControllerDtos.Aggregate"
            }
          },
          {
            "name": "UseReportingTimezone",
            "in": "query",
            "description": "If set, the API converts all dates to the variable's parent site TimeZone.\nThis parameter can't be set if TimeZoneId is specified.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "TimeZoneId",
            "in": "query",
            "description": "If set, the API converts all dates to the specified TimeZoneId. A TimeZoneId is a string corresponding to the name of the time zone.\nThe list of time zones is available at https://support.microsoft.com/en-nz/help/973627/microsoft-time-zone-index-values (BCL) and at https://www.iana.org/time-zones (IANA/TZDB).\nThis parameter can't be set if UseReportingTimezone is set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "The account restricting the data extraction (ADMIN ONLY).\nThis parameter can't be set if IncludeAllAccounts is set.\nFor non ADMIN users, the account Id is retrieved from the user's credentials.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "TargetUnits",
            "in": "query",
            "description": "List of target units (unit or symbol).",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "UnitTransformation",
            "in": "query",
            "description": "If data units will be transform to the first compatible target unit.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Query",
            "in": "query",
            "description": "a SQLite-compatible query allowing to aggregate the data returned by the above filter (second-level aggregation)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataControllerDtos.QueryResult"
                }
              }
            }
          }
        }
      }
    },
    "/dataAnalytics": {
      "get": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalytics"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dataAnalytics/{dataAnalyticsId}/instances": {
      "post": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "dataAnalyticsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
                }
              }
            }
          }
        }
      }
    },
    "/dataAnalytics/{dataAnalyticsId}/instances/{instanceId}": {
      "put": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "dataAnalyticsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "dataAnalyticsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldMask",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "dataAnalyticsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dataAnalytics/{dataAnalyticsId}/instances/{instanceId}/dataanalyticsproperties": {
      "put": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "dataAnalyticsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsPropertiesType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": { }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "object",
                "additionalProperties": { }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "object",
                "additionalProperties": { }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dataAnalytics/{dataAnalyticsId}/instances/{instanceId}/finalizeCreation": {
      "post": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "dataAnalyticsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instanceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dataAnalytics/instances": {
      "get": {
        "tags": [
          "DataAnalytics"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "AssetType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AssetIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "FieldMask",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstance"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/datalossdetection/variables": {
      "get": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Get data loss definitions based on filters. Filter parameters are mutually exclusive",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "SiteId",
            "in": "query",
            "description": "Search for variables subject to data loss detection in relationship with this site Id.",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Search for variables subject to data loss detection in relationship with this source Id.",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "Search for variables member of this list that are subject to data loss detection.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDefinitionDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/datalossdetection/variables/{variableId}": {
      "post": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Create a data loss detection variable on a given variable",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "description": "The Id of an existing variable that must be subject to data loss detection. This variable is supposed to (almost) regularly receive data points",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The parameters driving the data loss detection",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.CreateDataLossDetectionResponseDto"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Get the data loss detection definition on a given variable",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "description": "The Id of an existing variable that is subject to data loss detection",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDefinitionDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Delete an existing data loss detection variable on a given variable",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "description": "The Id of an existing variable that is subject to data loss detection",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/datalossdetection/variables/datalosses": {
      "get": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Get all variables currently facing data loss",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "SiteId",
            "in": "query",
            "description": "Search for variables subject to data loss detection in relationship with this site Id.",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Search for variables subject to data loss detection in relationship with this source Id.",
            "schema": {
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "Search for variables member of this list that are subject to data loss detection.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.VariableDataLoss"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/datalossdetection/variables/disable/{variableId}": {
      "put": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Disable the data loss detection on a variable that is subject to data loss detection",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "description": "The Id of an existing variable that is subject to data loss detection",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionStateChangeResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/datalossdetection/variables/enable/{variableId}": {
      "put": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Enable the data loss detection on a variable that is subject to data loss detection",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "description": "The Id of an existing variable that is subject to data loss detection",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionStateChangeResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/datalossdetection/variables/period/{variableId}": {
      "get": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Get the computed average period of a given variable subject to data loss detection",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "description": "The Id of an existing variable that is subject to data loss detection",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "date-span"
                }
              }
            }
          }
        }
      }
    },
    "/datalossdetection/variables/update/{variableId}": {
      "put": {
        "tags": [
          "DataLossDetection"
        ],
        "summary": "Update the existing data loss detection definition on a given variable. Update operation will reset all accumulated statistics used to estimate the variable period,\nmeaning that there must be at least 2 data points after the update to allow data loss detection. The update acts on both active and inactive detections.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "description": "The Id of an existing variable that is subject to data loss detection",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The parameters driving the data loss detection",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.UpdateDataLossDetectionDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.UpdateDataLossDetectionDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.UpdateDataLossDetectionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDefinitionDto"
                }
              }
            }
          }
        }
      }
    },
    "/datapusher": {
      "get": {
        "tags": [
          "DataPusher"
        ],
        "summary": "Gets all data pusher devices",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "enabled",
            "in": "query",
            "description": "State of data pushers.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.DataPusher"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dataquality/history/sources": {
      "get": {
        "tags": [
          "DataQualityHistory"
        ],
        "summary": "Gets sources data quality status",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceIds",
            "in": "query",
            "description": "Source ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualitySourceStatus"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dataquality/history/variables": {
      "get": {
        "tags": [
          "DataQualityHistory"
        ],
        "summary": "Gets variables data quality status",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableIds",
            "in": "query",
            "description": "Variable ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualitySourceStatus"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/dataquality/notifications/{sourceId}": {
      "get": {
        "tags": [
          "DataQualityNotification"
        ],
        "summary": "Gets data quality notifications",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source Id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DataQualityNotification"
        ],
        "summary": "Creates data quality notifications",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source Id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The notification.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
                }
              }
            }
          }
        }
      }
    },
    "/dataquality/notifications/{sourceId}/{notificationId}": {
      "put": {
        "tags": [
          "DataQualityNotification"
        ],
        "summary": "Updates data quality notifications",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The sourceId.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "notificationId",
            "in": "path",
            "description": "The notificationId.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The notification.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityNotification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "DataQualityNotification"
        ],
        "summary": "Deletes data quality notifications",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The sourceId.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "notificationId",
            "in": "path",
            "description": "The notificationId.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dataquality/overrides": {
      "get": {
        "tags": [
          "DataQualityOverrides"
        ],
        "summary": "Gets data quality overrides",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "VariableIds",
            "in": "query",
            "description": "List of variable Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Source Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DataQualityOverrides"
        ],
        "summary": "Creates data quality overrides",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "query",
            "description": "The sourceId.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The override.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
                }
              }
            }
          }
        }
      }
    },
    "/dataquality/overrides/{overrideId}": {
      "put": {
        "tags": [
          "DataQualityOverrides"
        ],
        "summary": "Updates data quality overrides",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "query",
            "description": "The sourceId.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "overrideId",
            "in": "path",
            "description": "The overrideId.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The override.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverride"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "DataQualityOverrides"
        ],
        "summary": "Deletes data quality overrides",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "query",
            "description": "The sourceId.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "overrideId",
            "in": "path",
            "description": "The overrideId.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/dataquality/templates": {
      "get": {
        "tags": [
          "DataQualityTemplates"
        ],
        "summary": "Gets data quality templates",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "GatewayTypeId",
            "in": "query",
            "description": "List gateway Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "EnergyTypeId",
            "in": "query",
            "description": "List energy type Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceTypeId",
            "in": "query",
            "description": "List source type Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableTypeId",
            "in": "query",
            "description": "List variable Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "DataQualityTemplates"
        ],
        "summary": "Creates data quality templates",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The template.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "DataQualityTemplates"
        ],
        "summary": "Updates data quality templates",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The template.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "DataQualityTemplates"
        ],
        "summary": "Deletes data quality templates",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "GatewayTypeId",
            "in": "query",
            "description": "Gateway type Id (Cannot be updated).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceTypeId",
            "in": "query",
            "description": "Source type Id (Cannot be updated).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "EnergyTypeId",
            "in": "query",
            "description": "Energy type Id (Cannot be updated).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableTypeId",
            "in": "query",
            "description": "Variable type Id (Cannot be updated).",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IngestionFrequency",
            "in": "query",
            "description": "ingestion frequency.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "IngestionFrequencyTimeBase",
            "in": "query",
            "description": "Ingestion frequency time base.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
            }
          },
          {
            "name": "IngestionDelay",
            "in": "query",
            "description": "Ingestion delay.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "IngestionDelayTimeBase",
            "in": "query",
            "description": "ingestion delay time base.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/energyTypes": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the energy types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EnergyType"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/energyUsages": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the energy usages.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EnergyUsage"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/errors": {
      "get": {
        "tags": [
          "ErrorCode"
        ],
        "summary": "Gets errors.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Code",
            "in": "query",
            "description": "Error code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Exception",
            "in": "query",
            "description": "Exception message (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ErrorCode"
        ],
        "summary": "Creates the specified error.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The error.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/errors/{code}": {
      "get": {
        "tags": [
          "ErrorCode"
        ],
        "summary": "Gets the specified error.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "ErrorCode"
        ],
        "summary": "Updates the specified error.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "The event id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The error.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.ErrorCodes.ErrorCode"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ErrorCode"
        ],
        "summary": "Deletes the specified error.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "The error id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/events": {
      "get": {
        "tags": [
          "Event"
        ],
        "summary": "Gets events.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Event Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "List of event ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Source Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Site Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SiteIds",
            "in": "query",
            "description": "List of site ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "From",
            "in": "query",
            "description": "From date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "To",
            "in": "query",
            "description": "To date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "CustomFilter",
            "in": "query",
            "description": "Custom query filter (ex: \"id=26 OR id=27\").",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Event"
        ],
        "summary": "Creates the specified event.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The event.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/events/{id}": {
      "get": {
        "tags": [
          "Event"
        ],
        "summary": "Gets the specified event.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The event id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Event"
        ],
        "summary": "Updates the specified event.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The event id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The event.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Event"
        ],
        "summary": "Deletes the specified event.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The event id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/events/eventTypes": {
      "get": {
        "tags": [
          "Event"
        ],
        "summary": "Gets the list of event types",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/events/timeRangeTypes": {
      "get": {
        "tags": [
          "Event"
        ],
        "summary": "Gets the list of time range types",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/extensions": {
      "get": {
        "tags": [
          "CloudItemExtention"
        ],
        "summary": "Gets all supported file extensions for cloud items.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "TypeId",
            "in": "query",
            "description": "The file type id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "TypeIds",
            "in": "query",
            "description": "List of file types id.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.ExtensionModel"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/extensions/checkExtension": {
      "post": {
        "tags": [
          "CloudItemExtention"
        ],
        "summary": "Checks the validity of the files extension.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The filename.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.FileExtentionValidationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.FileExtentionValidationRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.FileExtentionValidationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/externallogin/{type}/accountNameAndKey": {
      "post": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Create an external login based on an account name and key.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "externalServiceProviderId",
            "in": "query",
            "description": "External provider Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "description": "Login type.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Account name and account key.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AccountNameAndKeyAuthenticationContext"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AccountNameAndKeyAuthenticationContext"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AccountNameAndKeyAuthenticationContext"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/externallogin/{type}/basicAuth": {
      "post": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Create an external login based on an basic auth.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "externalServiceProviderId",
            "in": "query",
            "description": "External provider Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "description": "Login type.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Login and password.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.BasicAuthenticationContext"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.BasicAuthenticationContext"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.BasicAuthenticationContext"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/externallogin/{type}/basicAuthAndApiKey": {
      "post": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Create an external login based on an basic auth.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "externalServiceProviderId",
            "in": "query",
            "description": "External provider Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "description": "Login type.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Login and password.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.BasicAuthenticationAndApiKeyContext"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.BasicAuthenticationAndApiKeyContext"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.BasicAuthenticationAndApiKeyContext"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/externallogin/{type}/connectionString": {
      "post": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Create an external login based on an connection string.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "externalServiceProviderId",
            "in": "query",
            "description": "External provider Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "description": "Login type.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The connection string.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.ConnectionStringAuthenticationContext"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.ConnectionStringAuthenticationContext"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.ConnectionStringAuthenticationContext"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/externallogin/{type}/ftpCredientials": {
      "post": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Create an external login to a ftp provider.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "description": "Login type.",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Ftp connection infos",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.FtpCredentials"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.FtpCredentials"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.FtpCredentials"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/externallogin/account/externallogin": {
      "delete": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Remove an external login on the current account.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "serviceProvider",
            "in": "query",
            "description": "Service provider.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serviceKey",
            "in": "query",
            "description": "Service key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/externallogin/account/externallogins": {
      "get": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "List all external logins for the current account.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.AccountExternalServiceCredential"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/externallogin/all/externalLogins": {
      "get": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "List all external logins for the current user and account.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredential"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/externallogin/loginproviders": {
      "get": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "List all external service providers.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.ExternalServiceProvider"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/externallogin/user/externallogin": {
      "delete": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Remove and external login on the current user.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "serviceProvider",
            "in": "query",
            "description": "Service provider.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "serviceKey",
            "in": "query",
            "description": "Service key.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/externallogin/user/externallogins": {
      "get": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "List all external logins for the current user.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.UserExternalServiceCredential"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/externallogin/user/externallogins/{userId}": {
      "get": {
        "tags": [
          "ExternalLogin"
        ],
        "summary": "Get all external logins for an user.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "User Id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.UserExternalServiceCredential"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the file triggers",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ItemsPerPage",
            "in": "query",
            "description": "Number of items per page.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "SearchText on trigger value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTrigger"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Creates the specified trigger.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The trigger.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.UpdatedFileTrigger"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.UpdatedFileTrigger"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.UpdatedFileTrigger"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTrigger"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Updates the specified trigger.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The trigger.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.UpdatedFileTrigger"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.UpdatedFileTrigger"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.UpdatedFileTrigger"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTrigger"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Deletes the specified ids.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "The ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/fileTrigger/{id}": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets a file trigge by identifier.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTrigger"
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/count": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the file trigger count.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ItemsPerPage",
            "in": "query",
            "description": "Number of items per page.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "SearchText on trigger value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/fileTypes": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the file types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/filterTypes": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the filter types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/generateToken": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Generate a token.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/ingestionTypes": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the trigger ingestion types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/mappings": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the trigger types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Storage.V1.MapForceFile"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/triggerCombinations": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the trigger combinations.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/fileTrigger/triggerTypes": {
      "get": {
        "tags": [
          "FileTrigger"
        ],
        "summary": "Gets the trigger types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/form": {
      "get": {
        "tags": [
          "Form"
        ],
        "summary": "Gets the forms.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Id.Timestamp",
            "in": "query",
            "description": "The filter.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id.Machine",
            "in": "query",
            "description": "The filter.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id.Pid",
            "in": "query",
            "description": "The filter.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id.Increment",
            "in": "query",
            "description": "The filter.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id.CreationTime",
            "in": "query",
            "description": "The filter.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Searches on the Form name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Filters by a given account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "EntityTypeId",
            "in": "query",
            "description": "Filters by the entity type",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.EntityType"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "Filter by entity name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Type",
            "in": "query",
            "description": "Filter by form type",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.FormType"
            }
          },
          {
            "name": "Types",
            "in": "query",
            "description": "List of form type",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.FormType"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Form"
        ],
        "summary": "Creates the form.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The form.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
                }
              }
            }
          }
        }
      }
    },
    "/form/{id}": {
      "get": {
        "tags": [
          "Form"
        ],
        "summary": "Gets a form by id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Form"
        ],
        "summary": "Updates the form.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The form.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Form"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Form"
        ],
        "summary": "Deletes the form.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The form Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/form/entityTypes": {
      "get": {
        "tags": [
          "Form"
        ],
        "summary": "Gets the entity types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/form/fieldTypes": {
      "get": {
        "tags": [
          "Form"
        ],
        "summary": "Gets the field types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gateways": {
      "get": {
        "tags": [
          "Gateway"
        ],
        "summary": "Gets the gateways.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Gateway Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GatewayTypeId",
            "in": "query",
            "description": "Gateway type Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SimId",
            "in": "query",
            "description": "Gateway sim Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SerialNumber",
            "in": "query",
            "description": "Gateway serial number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Gateway"
        ],
        "summary": "Creates the specified model.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
                }
              }
            }
          }
        }
      }
    },
    "/gateways/{id}": {
      "get": {
        "tags": [
          "Gateway"
        ],
        "summary": "Gets the gateway.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Gateway"
        ],
        "summary": "Creates the specified model.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The gateway id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.Gateway"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Gateway"
        ],
        "summary": "Deletes the specified gateway.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The gateway identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/gateways/count": {
      "get": {
        "tags": [
          "Gateway"
        ],
        "summary": "Gets the gateway count.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Gateway Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GatewayTypeId",
            "in": "query",
            "description": "Gateway type Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SimId",
            "in": "query",
            "description": "Gateway sim Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SerialNumber",
            "in": "query",
            "description": "Gateway serial number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/gatewayTypes": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the gateway types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Gateway.GatewayType"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/geozones/jobs": {
      "get": {
        "tags": [
          "Job"
        ],
        "summary": "Get all jobs over the last 7 days",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Job"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Job"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Job"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/geozones/jobs/{jobTrackerId}": {
      "get": {
        "tags": [
          "Job"
        ],
        "summary": "Get a detailed job by id",
        "parameters": [
          {
            "name": "jobTrackerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedJob"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedJob"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DetailedJob"
                }
              }
            }
          }
        }
      }
    },
    "/geozones/types": {
      "get": {
        "tags": [
          "GeozoneType"
        ],
        "summary": "Get the complete list of geozone types",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "GeozoneType"
        ],
        "summary": "Create new geozone types",
        "requestBody": {
          "description": "The list of geozone types to create",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewGeozoneType"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewGeozoneType"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewGeozoneType"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "GeozoneType"
        ],
        "summary": "Update geozone types",
        "parameters": [
          {
            "name": "fieldMask",
            "in": "query",
            "description": "The list of updated geozone types",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "requestBody": {
          "description": "The list of geozone types to update",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GeozoneType"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GeozoneType"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/GeozoneType"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GeozoneType"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "GeozoneType"
        ],
        "summary": "Delete geozone types",
        "parameters": [
          {
            "name": "geozoneTypeIds",
            "in": "query",
            "description": "The list of geozone type Ids to delete",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "deleteRelatedGeozones",
            "in": "query",
            "description": "If true, all geozones of this type will be deleted. If false, the geozone type will be deleted if and only there is no existing geozone of this type",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/geozones/zones": {
      "get": {
        "tags": [
          "Geozone"
        ],
        "summary": "Get geozones satisfying a filter",
        "parameters": [
          {
            "name": "Ids",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Names",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "GeozoneTypeIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "GeozoneTypeNames",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "ReferenceGeozoneId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GeozoneRelation",
            "in": "query",
            "schema": {
              "enum": [
                "Descendants"
              ],
              "type": "string"
            }
          },
          {
            "name": "geoJsonContent",
            "in": "query",
            "description": "The content of the GeoJson geometry to include in the output geozones.\n            \nEmpty (0): no geometry\n            \nFull (1): the full geometry \n            \nSimplified (2): the simplified geometry (full geometry with less vertices)\n            \nEnvelope (3): the envelope of the full geometry",
            "schema": {
              "enum": [
                "Empty",
                "Full",
                "Simplified",
                "Envelope"
              ],
              "type": "string",
              "default": "Empty"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Geozone"
        ],
        "summary": "Create new geozones",
        "parameters": [
          {
            "name": "geoJsonContent",
            "in": "query",
            "description": "The content of the GeoJson geometry to include in the output geozones.\n            \nEmpty (0): no geometry\n            \nFull (1): the full geometry \n            \nSimplified (2): the simplified geometry (full geometry with less vertices)\n            \nEnvelope (3): the envelope of the full geometry",
            "schema": {
              "enum": [
                "Empty",
                "Full",
                "Simplified",
                "Envelope"
              ],
              "type": "string",
              "default": "Empty"
            }
          }
        ],
        "requestBody": {
          "description": "The list of geozones to create",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewGeozone"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewGeozone"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NewGeozone"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Geozone"
        ],
        "summary": "Update geozones",
        "description": "In this version, the geojson is not recomputed nor used to find its parent/child zones.",
        "parameters": [
          {
            "name": "fieldMask",
            "in": "query",
            "description": "A list of properties to update. If the list is empty, the geozones specified in !:updatedGeozones will overwrite the existing ones. If the list is not empty, the server\n            will only update the properties specified in this list",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "geoJsonContent",
            "in": "query",
            "description": "The content of the GeoJson geometry to include in the output geozones.\n            \nEmpty (0): no geometry\n            \nFull (1): the full geometry \n            \nSimplified (2): the simplified geometry (full geometry with less vertices)\n            \nEnvelope (3): the envelope of the full geometry",
            "schema": {
              "enum": [
                "Empty",
                "Full",
                "Simplified",
                "Envelope"
              ],
              "type": "string",
              "default": "Empty"
            }
          }
        ],
        "requestBody": {
          "description": "The list of geozones to update",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Geozone"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Geozone"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Geozone"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Geozone"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Geozone"
        ],
        "summary": "Delete geozones",
        "parameters": [
          {
            "name": "geozoneIds",
            "in": "query",
            "description": "The list of geozone Ids to delete",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/geozones/zones/evaluatesimplified/{geozoneId}": {
      "get": {
        "tags": [
          "Geozone"
        ],
        "summary": "Evaluate the simplification of the geometry of a Geozones",
        "parameters": [
          {
            "name": "geozoneId",
            "in": "path",
            "description": "The Id of the geozone",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "verticesThreshold",
            "in": "query",
            "description": "The number of vertices below which the simplification is useless and will not be applied (the original geometry will be kept)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1000
            }
          },
          {
            "name": "verticesDistanceTolerance",
            "in": "query",
            "description": "The distance tolerance for the simplification. All vertices in the simplified geometry will be within a distance of the original geometry\n            = (verticesDistanceTolerance * geozoneGeometry.NumberOfVertices / 1000). The default value applied during GeoJson file upload is 0.00002",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0.00002
            }
          },
          {
            "name": "includeGeozoneDetails",
            "in": "query",
            "description": "If true, the geometry of both full and simplified zones will be returned",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/geozones/zones/info/{geozoneId}": {
      "get": {
        "tags": [
          "Geozone"
        ],
        "summary": "Get geozone information's",
        "parameters": [
          {
            "name": "geozoneId",
            "in": "path",
            "description": "The Id of the Geozone",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeParentDetails",
            "in": "query",
            "description": "If true, parents of the Geozone will contain detailed info's",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/geozones/zones/recompute/{geozoneTypeId}": {
      "put": {
        "tags": [
          "Geozone"
        ],
        "summary": "Recompute the GeoJson simplified content of the geozones of a given type",
        "parameters": [
          {
            "name": "geozoneTypeId",
            "in": "path",
            "description": "The Id of the geozone type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "verticesThreshold",
            "in": "query",
            "description": "The number of vertices below which the simplification is useless and will not be applied (the original geometry will be kept)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1000
            }
          },
          {
            "name": "verticesDistanceTolerance",
            "in": "query",
            "description": "The distance tolerance for the simplification. All vertices in the simplified geometry will be within a distance of the original geometry\n            = (verticesDistanceTolerance * geozoneGeometry.NumberOfVertices / 1000). The default value applied during GeoJson file upload is 0.00002",
            "schema": {
              "type": "number",
              "format": "double",
              "default": 0.00002
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              },
              "text/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/geozones/zones/sample": {
      "get": {
        "tags": [
          "Geozone"
        ],
        "summary": "Get GeoJson file samples",
        "parameters": [
          {
            "name": "sampleType",
            "in": "query",
            "description": "The type of GeoJson files",
            "schema": {
              "enum": [
                "FeatureCollection",
                "SinglePolygon",
                "MultiPolygon"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/JsonNode"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/JsonNode"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/JsonNode"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/geozones/zones/sites": {
      "get": {
        "tags": [
          "Geozone"
        ],
        "summary": "Get the requested sites along with all the geozones they belong to",
        "parameters": [
          {
            "name": "siteIds",
            "in": "query",
            "description": "The list of site Ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Names",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "GeozoneTypeIds",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "GeozoneTypeNames",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "ReferenceGeozoneId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GeozoneRelation",
            "in": "query",
            "schema": {
              "enum": [
                "Descendants"
              ],
              "type": "string"
            }
          },
          {
            "name": "geoJsonContent",
            "in": "query",
            "description": "The content of the GeoJson geometry to include in the output geozones.\n            \nEmpty (0): no geometry\n            \nFull (1): the full geometry \n            \nSimplified (2): the simplified geometry (full geometry with less vertices)\n            \nEnvelope (3): the envelope of the full geometry",
            "schema": {
              "enum": [
                "Empty",
                "Full",
                "Simplified",
                "Envelope"
              ],
              "type": "string",
              "default": "Empty"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SiteWithGeozones"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SiteWithGeozones"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SiteWithGeozones"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/geozones/zones/upload": {
      "post": {
        "tags": [
          "Geozone"
        ],
        "summary": "Upload a features collection GeoJson file (text or ZIP) that contains one or more polygon or multi-polygon geometries and create one geozone per geometry.\nEvery feature in the GeoJson file must contain 'dh_geozoneTypeId' and 'dh_geozoneName' properties respectively defining the geozone type and name to combine with the geometry.",
        "parameters": [
          {
            "name": "relationType",
            "in": "query",
            "description": "The way relations to other zones must be established.\n            \nComputed (0): the service will automatically detect child/parent zones based on geometry overlapping.\n            \nProvided (1): the service will use the parents provided in the 'dh_parentZones' property of the feature to link the new zones to their parent zones.\n            \nIsolated (2): the service will not link the new zones to any other one.",
            "schema": {
              "enum": [
                "Computed",
                "Provided",
                "Isolated"
              ],
              "type": "string",
              "default": "Computed"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "geoJson": {
                    "type": "string",
                    "description": "The geoJson file containing a features collection. The file must follow the GeoJson format (!:https://datatracker.ietf.org/doc/html/rfc7946) and\n            only accepts 'Polygon' and 'MultiPolygons' feature geometry types",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "geoJson": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfoIAsyncEnumerable"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfoIAsyncEnumerable"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfoIAsyncEnumerable"
                }
              }
            }
          }
        }
      }
    },
    "/geozones/zones/upload/{geozoneTypeId}": {
      "post": {
        "tags": [
          "Geozone"
        ],
        "summary": "Upload a features collection GeoJson file (text or ZIP) that contains one or more polygon or multi-polygon geometries and create one geozone (of type geozoneTypeId) per geometry.",
        "parameters": [
          {
            "name": "geozoneTypeId",
            "in": "path",
            "description": "The Id of the geozone type that must be associated to all geozones contained in the uploaded file",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "geozoneNameProperty",
            "in": "query",
            "description": "The name of a geometry attribute that contains the name of the geozone",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "relationType",
            "in": "query",
            "description": "The way relations to other zones must be established.\n            \nComputed (0): the service will automatically detect child/parent zones based on geometry overlapping.\n            \nProvided (1): the service will use the Ids provided in parentGeozoneIds to link the new zones to their parent zones.\n            \nIsolated (2): the service will not link the new zones to any other one.",
            "schema": {
              "enum": [
                "Computed",
                "Provided",
                "Isolated"
              ],
              "type": "string",
              "default": "Computed"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "geoJson": {
                    "type": "string",
                    "description": "The geoJson file containing a features collection. The file must follow the GeoJson format (!:https://datatracker.ietf.org/doc/html/rfc7946) and\n            only accepts 'Polygon' and 'MultiPolygons' feature geometry types",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "geoJson": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfoIAsyncEnumerable"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfoIAsyncEnumerable"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfoIAsyncEnumerable"
                }
              }
            }
          }
        }
      }
    },
    "/geozones/zones/upload/{geozoneTypeId}/{geozoneName}": {
      "post": {
        "tags": [
          "Geozone"
        ],
        "summary": "Upload a GeoJson file (text or ZIP) and create a geozone that contains the geometry specified in the file.",
        "parameters": [
          {
            "name": "geozoneTypeId",
            "in": "path",
            "description": "The Id of the geozone type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "geozoneName",
            "in": "path",
            "description": "The name of the geozone",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parentGeozoneIds",
            "in": "query",
            "description": "The list of parent geozone Ids for all geozones int the uploaded file. This parameter is only walid when geoJsonContent is 'Provided'",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "relationType",
            "in": "query",
            "description": "The way relations to other zones must be established.\n            \nComputed (0): the service will automatically detect child/parent zones based on geometry overlapping.\n            \nProvided (1): the service will use the Ids provided in parentGeozoneIds to link the new zone to it's parent zones.\n            \nIsolated (2): the service will not link the new zone to any other one.",
            "schema": {
              "enum": [
                "Computed",
                "Provided",
                "Isolated"
              ],
              "type": "string",
              "default": "Computed"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "geoJson": {
                    "type": "string",
                    "description": "The geoJson file containing a single geometry. The file must follow the GeoJson format (!:https://datatracker.ietf.org/doc/html/rfc7946) and\n            must be a 'Polygon', 'MultiPolygon' geometry or a features collection containing polygons or multi-polygon. The service will only handle the first feature in the collection",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "geoJson": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfo"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateGeozoneJobInfo"
                }
              }
            }
          }
        }
      }
    },
    "/granularity": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the granularity items.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.NameValue"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invitation": {
      "get": {
        "tags": [
          "Invitation"
        ],
        "summary": "Gets the filtered invitations.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "SearchText",
            "in": "query",
            "description": "Search text on email.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "description": "Invitation status.",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.InvitationStatus"
            }
          },
          {
            "name": "IncludeAll",
            "in": "query",
            "description": "Search on all accounts (ADMIN ONLY).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Search on specified account id (Only if IncludeAll=false).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "InvitationId",
            "in": "query",
            "description": "Invitation Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "InvitationToken",
            "in": "query",
            "description": "Invitation token.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[EnergyImpact.Shared.Core.Invitations.Invitation, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invitation"
        ],
        "summary": "Creates the specified invitation.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.Invitation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.Invitation"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.Invitation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Invitation"
        ],
        "summary": "Updates the invitation.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.Invitation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.Invitation"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.Invitation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/invitation/isEmailUnique": {
      "post": {
        "tags": [
          "Invitation"
        ],
        "summary": "Determines whether an email adddress is already present in the application.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EmailViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EmailViewModel"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EmailViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/invitation/roles": {
      "get": {
        "tags": [
          "Invitation"
        ],
        "summary": "Gets the available roles.",
        "description": "The list is filtered based on the current user permissions",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.Role"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invitation/sendBack": {
      "post": {
        "tags": [
          "Invitation"
        ],
        "summary": "Sends the back invitation email (if unused).",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SendBackEmailInvitation"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SendBackEmailInvitation"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SendBackEmailInvitation"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/invitationNotification/{invitationId}": {
      "get": {
        "tags": [
          "InvitationNotification"
        ],
        "summary": "Get all the invitation notifications",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.InvitationNotifications.InvitationNotification"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Get all invoices.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "SiteId",
            "in": "query",
            "description": "List of site Ids.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id. (Only if IncludeAllAccounts=false - ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IncludeAllAccounts",
            "in": "query",
            "description": "Include all accounts (ADMIN ONLY).",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Invoice Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of source ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Types",
            "in": "query",
            "description": "List of invoice type.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.InvoiceType"
              }
            }
          },
          {
            "name": "From",
            "in": "query",
            "description": "Invoice from date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "To",
            "in": "query",
            "description": "Invoice to date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "Search",
            "in": "query",
            "description": "Custom search.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Invoice"
        ],
        "summary": "Create an invoice.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The new invoice.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{invoiceId}": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Get an invoice.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "Invoice Id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Invoice"
        ],
        "summary": "Update an invoice.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "Invoice Id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "Update invoice.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.Invoice"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Invoice"
        ],
        "summary": "Remove an invoice.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/invoices/statuses": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Get the list of invoice statuses.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/invoices/types": {
      "get": {
        "tags": [
          "Invoice"
        ],
        "summary": "Get the list of invoice types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/languages": {
      "get": {
        "tags": [
          "Language"
        ],
        "summary": "Gets all languages.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.Language"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/notificationMessageStatusHistory/{trackingId}": {
      "get": {
        "tags": [
          "NotificationMessageStatusHistory"
        ],
        "summary": "Get all the Notification message status history for an tracking Id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "trackingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistory"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/notificationMessageStatusHistory/Plivo": {
      "post": {
        "tags": [
          "NotificationMessageStatusHistory"
        ],
        "summary": "Insert a notification message status history Plivo.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The list of notifications.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistoryPlivo"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistoryPlivo"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistoryPlivo"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/notificationMessageStatusHistory/Sendgrid": {
      "post": {
        "tags": [
          "NotificationMessageStatusHistory"
        ],
        "summary": "Insert a notification message status history Sendgrid.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The list of notifications.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistorySendgrid"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistorySendgrid"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistorySendgrid"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "format": "int32"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/opendatamodel/sql/connectionString": {
      "post": {
        "tags": [
          "Sql"
        ],
        "summary": "Setup ODM to know/store the destination database",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Sql"
        ],
        "summary": "Get existing connection info",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OdmConfiguration"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OdmConfiguration"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OdmConfiguration"
                }
              }
            }
          }
        }
      }
    },
    "/opendatamodel/sql/data/initialize": {
      "put": {
        "tags": [
          "Sql"
        ],
        "summary": "Reset and initialize the ODM database",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/opendatamodel/sql/feedback": {
      "get": {
        "tags": [
          "Sql"
        ],
        "summary": "Get an excerpt of the ODM feedback table",
        "parameters": [
          {
            "name": "beforeDateUtc",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Sql"
        ],
        "summary": "Clear the ODM feedback table",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/opendatamodel/sql/query": {
      "post": {
        "tags": [
          "Sql"
        ],
        "summary": "Execute a SQL query statement against the ODM database",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/opendatamodel/sql/readOnlyQuery": {
      "post": {
        "tags": [
          "Sql"
        ],
        "summary": "Execute a 'SELECT' SQL query statement against the ODM database",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/opendatamodel/sql/tableTemplates": {
      "get": {
        "tags": [
          "Sql"
        ],
        "summary": "Get table templates corresponding to current DataHub entities. These templates contain all properties and form properties.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/OdmTableSchemaTemplates"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OdmTableSchemaTemplates"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/OdmTableSchemaTemplates"
                }
              }
            }
          }
        }
      }
    },
    "/organizations": {
      "get": {
        "tags": [
          "Organization"
        ],
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Organizations.OrganizationDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Organization"
        ],
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.CreateOrganizationBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.CreateOrganizationBody"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.CreateOrganizationBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Organizations.OrganizationDto"
                }
              }
            }
          }
        }
      }
    },
    "/organizations/{id}": {
      "get": {
        "tags": [
          "Organization"
        ],
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Organizations.OrganizationDto"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Organization"
        ],
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.UpdateOrganizationBody"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.UpdateOrganizationBody"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.UpdateOrganizationBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Organizations.OrganizationDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Organization"
        ],
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/quantityTypes": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets time periods.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Gets a report.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "CloudItemId",
            "in": "query",
            "description": "Report cloud item id on local storage. (Deprecated. Use templateId instead to find reports that use this template.)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "deprecated": true
            }
          },
          {
            "name": "TemplateId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Report Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "List of report Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Site Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "UsesViewId",
            "in": "query",
            "description": "View Id used by report.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UsesViewIds",
            "in": "query",
            "description": "List of view Ids used by report.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User Id (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "View Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Creates a report.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The report.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
                }
              }
            }
          }
        }
      }
    },
    "/reports/{reportId}": {
      "put": {
        "tags": [
          "Report"
        ],
        "summary": "Updates a report.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "The id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The report.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Report"
        ],
        "summary": "Delete the report with the specified id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "The id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Get a report by id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "The identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDto"
                }
              }
            }
          }
        }
      }
    },
    "/reports/exports/{reportId}": {
      "post": {
        "tags": [
          "Report"
        ],
        "summary": "Generates the export.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "The report id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The definition of the export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportNotificationDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportNotificationDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportNotificationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/reports/notificationFormats": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the schedule notification formats.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/notificationSendAsTypes": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the schedule notification send as types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/notificationTargets": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the schedule notification targets.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/notificationTypes": {
      "get": {
        "tags": [
          "Report"
        ],
        "summary": "Gets the schedule notification types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/occurrences": {
      "get": {
        "tags": [
          "Report"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "AccountId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ReportId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportOccurrenceDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/templates": {
      "get": {
        "tags": [
          "ReportTemplate"
        ],
        "summary": "Get report templates.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Report template Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "List of report template Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "TemplateType",
            "in": "query",
            "description": "Report template type",
            "schema": {
              "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_TemplateType"
            }
          },
          {
            "name": "CloudItemId",
            "in": "query",
            "description": "CloudItem Id (Only if TemplateType = CloudItem).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "Report template name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ReportTemplate"
        ],
        "summary": "Create a report template.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The report template.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
                }
              }
            }
          }
        }
      }
    },
    "/reports/templates/{reportTemplateId}": {
      "put": {
        "tags": [
          "ReportTemplate"
        ],
        "summary": "Update a report template.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "reportTemplateId",
            "in": "path",
            "description": "The report template's id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The report template",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ReportTemplate"
        ],
        "summary": "Delete the report template with the specified id.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "reportTemplateId",
            "in": "path",
            "description": "The id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/reports/views": {
      "post": {
        "tags": [
          "ReportView"
        ],
        "summary": "Create a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "ReportView"
        ],
        "summary": "Get all alerts.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Ids",
            "in": "query",
            "description": "List of views Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "View Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeTemporary",
            "in": "query",
            "description": "If temporary views are includes.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "View name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User Id (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/reports/views/{id}": {
      "delete": {
        "tags": [
          "ReportView"
        ],
        "summary": "Delete a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Views Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/reports/views/{viewId}": {
      "put": {
        "tags": [
          "ReportView"
        ],
        "summary": "Update a view",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "description": "View Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.ReportViewDto"
                }
              }
            }
          }
        }
      }
    },
    "/schedule": {
      "get": {
        "tags": [
          "Schedule"
        ],
        "summary": "Load schedules to our system.",
        "description": "The current schedules will be overwriten",
        "parameters": [
          {
            "name": "ScheduleId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Schedule"
        ],
        "summary": "Save a new schedule.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The schedule definition.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/schedule/{scheduleId}": {
      "put": {
        "tags": [
          "Schedule"
        ],
        "summary": "Save an existing schedule.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The schedule definition.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Schedule"
        ],
        "summary": "Delete a schedule.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/schedule/{scheduleId}/device": {
      "get": {
        "tags": [
          "Schedule"
        ],
        "summary": "Load the schedules from the source to our system.",
        "description": "The current schedules will be overwriten",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "the schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
                }
              }
            }
          }
        }
      }
    },
    "/schedule/{scheduleId}/exceptions": {
      "get": {
        "tags": [
          "Schedule"
        ],
        "summary": "Gets exceptions for a schedule",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleException"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Schedule"
        ],
        "summary": "Creates an exception for a schedule",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The exception to be created",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleException"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleException"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleException"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/schedule/{scheduleId}/exceptions/{exceptionId}": {
      "put": {
        "tags": [
          "Schedule"
        ],
        "summary": "Updates an exception for a schedule",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "exceptionId",
            "in": "path",
            "description": "The exception id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The exception to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleException"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleException"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleException"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Schedule"
        ],
        "summary": "Updates an exception for a schedule",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "exceptionId",
            "in": "path",
            "description": "The exception id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/schedule/{scheduleId}/levels": {
      "get": {
        "tags": [
          "Schedule"
        ],
        "summary": "Get schedule levels for a schedule.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule Id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleLevel"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Schedule"
        ],
        "summary": "Add a list of schedule level to a schedule.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "Schedule Id.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "levels.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleLevel"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleLevel"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleLevel"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/schedule/{scheduleId}/ticks/year/{year}/week/{week}/copy/year/{targetYear}/week/{targetWeek}/{weekCount}": {
      "post": {
        "tags": [
          "Schedule"
        ],
        "summary": "Updates an exception for a schedule",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "year",
            "in": "path",
            "description": "The source year.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "week",
            "in": "path",
            "description": "the source week.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "targetYear",
            "in": "path",
            "description": "the target year.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "targetWeek",
            "in": "path",
            "description": "the target week.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "weekCount",
            "in": "path",
            "description": "the number of week to copy.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/schedule/{scheduleId}/ticks/year/{year}/week/{weekNumber}": {
      "get": {
        "tags": [
          "Schedule"
        ],
        "summary": "Gets the ticks for a schedule for a given week",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "year",
            "in": "path",
            "description": "The year.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "weekNumber",
            "in": "path",
            "description": "The week number.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleTick"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Schedule"
        ],
        "summary": "Saves the ticks for a given week",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "description": "The schedule identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "year",
            "in": "path",
            "description": "The year.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "weekNumber",
            "in": "path",
            "description": "The week number.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The ticks of the week to be saved",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleTick"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleTick"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.ScheduleTick"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/schedule/site/{siteId}": {
      "get": {
        "tags": [
          "Schedule"
        ],
        "summary": "Gets the schedules for a site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Schedules.Schedule"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sims": {
      "get": {
        "tags": [
          "Sim"
        ],
        "summary": "Gets the sims.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ItemsPerPage",
            "in": "query",
            "description": "Number of items per page.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "SearchText on trigger value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Sim"
        ],
        "summary": "Creates the sim.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The sim.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Sim"
        ],
        "summary": "Updates the specified sim.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The sim.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Sim"
        ],
        "summary": "Deletes the specified ids.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "The ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sims/{id}": {
      "get": {
        "tags": [
          "Sim"
        ],
        "summary": "Gets the sim.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Sim"
                }
              }
            }
          }
        }
      }
    },
    "/sims/count": {
      "get": {
        "tags": [
          "Sim"
        ],
        "summary": "Gets the sims count.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ItemsPerPage",
            "in": "query",
            "description": "Number of items per page.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "SearchText on trigger value.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/sims/providers": {
      "get": {
        "tags": [
          "Sim"
        ],
        "summary": "Gets all sim providers.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SimProvider"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sites": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "Gets all sites filtered",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "description": "Site display level (default value \"Site(0)\")",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sites.SiteDisplayLevel"
            }
          },
          {
            "name": "GroupId",
            "in": "query",
            "description": "Filters on the group id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "TypeId",
            "in": "query",
            "description": "Filters on the site type id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "Filters on the source id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "Filters on source ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SiteIds",
            "in": "query",
            "description": "Filters on site ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "NoGroup",
            "in": "query",
            "description": "Filters on sites that are not in any group",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Full text search on the site properties",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Filters on the account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "IncludeAll",
            "in": "query",
            "description": "Skip security filters (ADMIN ONLY)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "Filters for a given user",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "Filter by view Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CustomFilter",
            "in": "query",
            "description": "Filters on any site field using query language (i.e. PostalCode=1000 OR MyCustomProperties.MyGroup.CustomProperty =\n20 )",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GeozoneId",
            "in": "query",
            "description": "Filter by a Geozone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SiteLight"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Creates the site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The site.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSite"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSite"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      }
    },
    "/sites/{siteId}": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "Gets the site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSite"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Site"
        ],
        "summary": "Updates the site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The new site.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSite"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSite"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSite"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "tags": [
          "Site"
        ],
        "summary": "Patches the site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The patch site operations.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Site"
        ],
        "summary": "Deletes the site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The id of the site to delete.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sites/{siteId}/user/{userId}": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Adds the user to site.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Site"
        ],
        "summary": "Removes the user to site.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sites/{siteId}/users": {
      "get": {
        "tags": [
          "Site"
        ],
        "summary": "Gets the users for site.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sites/user/{userId}": {
      "post": {
        "tags": [
          "Site"
        ],
        "summary": "Adds the user to sites.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The site identifiers.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Site"
        ],
        "summary": "Removes the user from sites.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The site identifiers.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sites/views": {
      "post": {
        "tags": [
          "SiteView"
        ],
        "summary": "Create a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "SiteView"
        ],
        "summary": "Get all sites.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Ids",
            "in": "query",
            "description": "List of views Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "View Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeTemporary",
            "in": "query",
            "description": "If temporary views are includes.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "View name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User Id (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sites/views/{id}": {
      "delete": {
        "tags": [
          "SiteView"
        ],
        "summary": "Delete a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Views Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sites/views/{viewId}": {
      "put": {
        "tags": [
          "SiteView"
        ],
        "summary": "Update a view",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "description": "View Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.SiteViewDto"
                }
              }
            }
          }
        }
      }
    },
    "/sitetypes": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the site types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SiteType"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sources": {
      "get": {
        "tags": [
          "Source"
        ],
        "summary": "Gets the sources by filter.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "description": "Display level (default: Light(0))",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.SourceDisplayLevel"
            }
          },
          {
            "name": "EventIds",
            "in": "query",
            "description": "Filters by the related event id (DEPRECATED, Retrieve the related SourceIds from GET Events API instead.)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "deprecated": true
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Filters by the source id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Ids",
            "in": "query",
            "description": "Filters by source ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SourceTypeId",
            "in": "query",
            "description": "Filters by the source type id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "EnergyTypeId",
            "in": "query",
            "description": "Filters by the energy type id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GatewayId",
            "in": "query",
            "description": "Filters by the related gateway id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Filters by the related site id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SerialNumber",
            "in": "query",
            "description": "Filters by the serial number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SiteIds",
            "in": "query",
            "description": "Filters by the related site ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Ean",
            "in": "query",
            "description": "Filters by the EAN",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "GatewayTypeId",
            "in": "query",
            "description": "Filters by the related gateway type id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "GatewaySerialNumber",
            "in": "query",
            "description": "Filters by the related gateway serial number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MeterAddress",
            "in": "query",
            "description": "Filters by the meter address",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "MeterNumber",
            "in": "query",
            "description": "Filters by the meter number",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeAllAccounts",
            "in": "query",
            "description": "Skips Account security filter (ADMIN ONLY - DEPRECATED)",
            "schema": {
              "type": "boolean",
              "deprecated": true
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Filters by a given account id (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "Filters by a given user id (MANAGER OR ADMIN ONLY)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "VariableId",
            "in": "query",
            "description": "Filters by the variable Id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "Filters by variable ids",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "State",
            "in": "query",
            "description": "Filters by the source state (ADMIN ONLY)",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SourceState"
            }
          },
          {
            "name": "States",
            "in": "query",
            "description": "Filters by source states (ADMIN ONLY)",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SourceState"
              }
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "DEPRECATED, use customFilter instead",
            "schema": {
              "type": "string",
              "deprecated": true
            }
          },
          {
            "name": "VariableTypeId",
            "in": "query",
            "description": "Filters by variable type id",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Tags",
            "in": "query",
            "description": "Filters by tags",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "Filters by source name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "OdmSqlFilter",
            "in": "query",
            "description": "Filters using SQL query (ODM SQL Sources)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CustomFilter",
            "in": "query",
            "description": "Filters on any source field using query language (i.e. EAN=1000 OR MyCustomProperties.MyGroup.CustomProperty = MyValue )",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "Filter by view Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeTimeSlicedValues",
            "in": "query",
            "description": "When true, timesliced values arrays are included on returned sources. Defaults to false.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[EnergyImpact.Shared.Core.Models.SourceLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Source"
        ],
        "summary": "Creates the specified source information.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The source information.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SiteVerboseSource"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SiteVerboseSource"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SiteVerboseSource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSource"
                }
              }
            }
          }
        }
      }
    },
    "/sources/{sourceId}": {
      "get": {
        "tags": [
          "Source"
        ],
        "summary": "Gets the source.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTimeSlicedValues",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSource"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Source"
        ],
        "summary": "Updates the specified model.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSource"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSource"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VerboseSource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "tags": [
          "Source"
        ],
        "summary": "Patches the source.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The patch source operations.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Source"
        ],
        "summary": "deletes sources.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "HardDelete",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/attributes/{formName}/{groupName}/{fieldName}/slices": {
      "post": {
        "tags": [
          "Source"
        ],
        "summary": "Adds a single slice to a timesliced attribute of a source.\nThe slice must have an effectiveDate greater than or equal to the effectiveDate of all existing slices.\nIf the value is identical to the last slice, no new slice is created.\nIf effectiveDate equals the last slice's effectiveDate but the value differs, the last slice is updated.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "formName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fieldName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.SourceControllerDtos.AddSliceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.SourceControllerDtos.AddSliceRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.SourceControllerDtos.AddSliceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/dataQuality": {
      "post": {
        "tags": [
          "SourceDataQuality"
        ],
        "summary": "Triggers data quality check.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "SourceDataQuality"
        ],
        "summary": "Deletes/flushes data quality history.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/dataQuality/{historyId}": {
      "put": {
        "tags": [
          "SourceDataQuality"
        ],
        "summary": "Triggers data quality check.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "historyId",
            "in": "path",
            "description": "The data quality history identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/history": {
      "get": {
        "tags": [
          "SourceHistory"
        ],
        "summary": "Gets the source history.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.History.SourceHistory"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sources/{sourceId}/notes": {
      "get": {
        "tags": [
          "SourceNote"
        ],
        "summary": "Gets the notes.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "SourceNote"
        ],
        "summary": "Creates a note.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
                }
              }
            }
          }
        }
      }
    },
    "/sources/{sourceId}/notes/{noteId}": {
      "put": {
        "tags": [
          "SourceNote"
        ],
        "summary": "Edits a note.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "noteId",
            "in": "path",
            "description": "The note identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Sources.Notes.SourceNote"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "SourceNote"
        ],
        "summary": "Deletes a note.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "noteId",
            "in": "path",
            "description": "The note identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/user/{userId}": {
      "post": {
        "tags": [
          "Source"
        ],
        "summary": "Adds the source to user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Source"
        ],
        "summary": "Removes the source from user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/variables/{variableId}": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Gets a variables.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "description": "The variable identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.Variable"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Variable"
        ],
        "summary": "Updates a variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "description": "The variable identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "noProcessingRequired",
            "in": "query",
            "description": "True if no re processing of existing data is required upon update",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The variable to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.VerboseVariable"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.VerboseVariable"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.VerboseVariable"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Variable"
        ],
        "summary": "Deletes a variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "description": "The variable identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "tags": [
          "Variable"
        ],
        "summary": "Patches a variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "description": "The variable identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "noProcessingRequired",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The variable patch.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/variables/{variableId}/calculated/evaluate": {
      "post": {
        "tags": [
          "Variable"
        ],
        "summary": "Evaluates a calculated variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "description": "The variable identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The calculated variable formula to evaluate.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.ValidationResultData"
                }
              }
            }
          }
        }
      }
    },
    "/sources/{sourceId}/variables/{variableId}/calculated/sampleData": {
      "post": {
        "tags": [
          "Variable"
        ],
        "summary": "Gets sample data for a calculated variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "description": "The variable identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The calculated variable formula to get sample data for.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/variables/{variableId}/calculated/validate": {
      "post": {
        "tags": [
          "Variable"
        ],
        "summary": "Validates a calculated variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "description": "The variable identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The calculated variable formula to validate.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.ValidationResult"
                }
              }
            }
          }
        }
      }
    },
    "/sources/{sourceId}/variables/{variableId}/disable": {
      "put": {
        "tags": [
          "Variable"
        ],
        "summary": "Disable Calculated Variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/variables/{variableId}/enable": {
      "put": {
        "tags": [
          "Variable"
        ],
        "summary": "Enable Calculated Variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/{sourceId}/variables/{variableId}/recompute": {
      "put": {
        "tags": [
          "Variable"
        ],
        "summary": "Recompute Calculated Variable.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "variableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.RecomputeCalculatedVariableRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.RecomputeCalculatedVariableRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.RecomputeCalculatedVariableRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/site": {
      "post": {
        "tags": [
          "Source"
        ],
        "summary": "Add source to site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sourceId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Source"
        ],
        "summary": "Remove source from site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "sourceId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/user/{userId}": {
      "post": {
        "tags": [
          "Source"
        ],
        "summary": "Adds the sources to user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The source identifiers.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Source"
        ],
        "summary": "Removes the sources from user.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user identifier.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The source identifiers.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/views": {
      "post": {
        "tags": [
          "SourceView"
        ],
        "summary": "Create a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "SourceView"
        ],
        "summary": "Get source views.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Ids",
            "in": "query",
            "description": "List of views Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "View Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeTemporary",
            "in": "query",
            "description": "If temporary views are includes.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "View name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User Id (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sources/views/{id}": {
      "delete": {
        "tags": [
          "SourceView"
        ],
        "summary": "Delete a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Views Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/sources/views/{viewId}": {
      "put": {
        "tags": [
          "SourceView"
        ],
        "summary": "Update a view",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "viewId",
            "in": "path",
            "description": "View Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.SavedViewDto"
                }
              }
            }
          }
        }
      }
    },
    "/sourceTypes": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the source types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SourceType"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/storage": {
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Uploads the file in the storage of the currently connected user.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Filename",
            "in": "query",
            "description": "File name (with extension).",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Tag",
            "in": "query",
            "description": "File tag.",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.StorageItemTag"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Site Id?",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "summary": "Deletes the files.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "The files identifier.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "List files on storage.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "GroupId",
            "in": "query",
            "description": "Group Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (must be > 0)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The items per page (Must be > 0 and <= 500)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 500
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Custom query.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "FileName",
            "in": "query",
            "description": "File name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SiteTypeId",
            "in": "query",
            "description": "Site type id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SiteId",
            "in": "query",
            "description": "Site Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Tags",
            "in": "query",
            "description": "List of tags.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "CloudItemTypeId",
            "in": "query",
            "description": "File type (Cloud item type Id).",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Storage.V1.StorageItemTypeEnum"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.StorageItem"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/storage/{id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Gets the cloud item.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.StorageItem"
                }
              }
            }
          }
        }
      }
    },
    "/storage/exportTemplates": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Gets all export templates.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.StorageItemLight"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/storage/file": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Download the files.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "description": "The id of the file to download.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/storage/tags": {
      "get": {
        "tags": [
          "Storage"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/tags": {
      "get": {
        "tags": [
          "Tag"
        ],
        "summary": "Gets all the tags",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "uniqueItems": true,
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/themes/{clientId}/style": {
      "get": {
        "tags": [
          "ThemeStyle"
        ],
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Themes.Models.ThemeStyle"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          }
        }
      },
      "post": {
        "tags": [
          "ThemeStyle"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Themes.Models.ThemeStyle"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Themes.Models.ThemeStyle"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Themes.Models.ThemeStyle"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Themes.Models.ThemeStyle"
                }
              }
            }
          }
        }
      }
    },
    "/themes/{clientId}/style/reset": {
      "post": {
        "tags": [
          "ThemeStyle"
        ],
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          }
        }
      }
    },
    "/timePeriods": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets time periods.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/timezones": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets all sites filtered by account identifier.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Timezone"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/unitFamily": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the unit family",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UnitFamily"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/units": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the units.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Unit"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/adminUsers": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets all users with role ADMIN.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoLight"
                  }
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/user/canAccessToGroup/{groupId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Determines whether the current user can access the specified group.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "description": "The group identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/user/canAccessToSite/{siteId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Determines whether the current user can access the specified site.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "description": "The site identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/user/canAccessToSource/{sourceId}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Determines whether the current user can access the specified source.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/user/claim/{id}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the claims.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/claims/add": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Adds the claim to an user.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The claim.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/claims/edit": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Edits the claim.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The claim.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/claims/remove": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Removes the claims.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The claims.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserClaim"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/create": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Creates the specified user.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The user.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Register"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Register"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Register"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/user/delete": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Deletes the specified user.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The user lock.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/features": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the features for user connected.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Constants.ClaimsConstants_FeatureInfo"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/getUnitsPreference": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the units preference.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "format": "int32"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/info": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get current user information.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModelWithCurrentUserAccountIdBackwardCompatible"
                }
              }
            }
          }
        }
      }
    },
    "/user/info/{id}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the user information.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModelWithAccountIdBackwardCompatible"
                }
              }
            }
          }
        }
      }
    },
    "/user/isEmailUnique": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Checks if the email is unique",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The email.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EmailViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EmailViewModel"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EmailViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/user/lock": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Locks the specified user.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The user lock.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserLock"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserLock"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserLock"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/password": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Posts the password.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.ManageUser"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.ManageUser"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.ManageUser"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.Response"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/user/remove": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Removes the role from an user.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The remove role.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.RemoveRole"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.RemoveRole"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.RemoveRole"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/resetPassword/{userid}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Resets the user password.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "The user Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/user/role/{id}": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the list of users with this role.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Role Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.RoleUser"
                }
              }
            }
          }
        }
      }
    },
    "/user/rolemapping": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the role mapping.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.Role"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/roles": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets all roles.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.Role"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/user/roles/save": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Update roles.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.PostRole"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.PostRole"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.PostRole"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/save": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Update the user.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model (only the specified field will be update).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/user/saveUnitsPreference": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Saves the units preference.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The preference.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            },
            "application/json-patch+json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/user/saveUser": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Update an user.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The model (only the specified field will be update).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
                }
              }
            }
          }
        }
      }
    },
    "/user/updatePasswordLink": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get update password link",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirectUrl",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.LinkResponse"
                }
              }
            }
          }
        }
      }
    },
    "/user/usermapping": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the user mapping.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserInfoLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      }
    },
    "/user/users": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Gets the users.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The user search.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.UserSearchResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Gets the users.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserDisplayLevel"
            }
          },
          {
            "name": "Paging.PageNumber",
            "in": "query",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Paging.ItemsPerPage",
            "in": "query",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ViewId",
            "in": "query",
            "description": "View ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SearchText",
            "in": "query",
            "description": "Search text (search on pseudo, first name, last name and email)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id. (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Claims",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.ClaimFilter"
              }
            }
          },
          {
            "name": "Roles",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "BusinessKeys.Name",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserBusinessKeyName"
            }
          },
          {
            "name": "BusinessKeys.Values",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]"
                }
              }
            }
          }
        }
      }
    },
    "/users/views": {
      "post": {
        "tags": [
          "UserView"
        ],
        "summary": "Create a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "UserView"
        ],
        "summary": "Get all views.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Ids",
            "in": "query",
            "description": "List of views Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "View Id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "IncludeTemporary",
            "in": "query",
            "description": "If temporary views are includes.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "View name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UserId",
            "in": "query",
            "description": "User Id (ADMIN ONLY).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account Id (ADMIN ONLY).",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ViewType",
            "in": "query",
            "description": "The type of UserView",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserViewType"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/users/views/{id}": {
      "put": {
        "tags": [
          "UserView"
        ],
        "summary": "Update a view",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "View Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The view updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserView"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "UserView"
        ],
        "summary": "Delete a view.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Views Id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/variables": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Gets variables.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "DisplayLevel",
            "in": "query",
            "description": "Variable display level.",
            "schema": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Variables.VariableDisplaylevel"
            }
          },
          {
            "name": "Id",
            "in": "query",
            "description": "Variable Id. If specified, only a single variable matching this Id will be returned.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableIds",
            "in": "query",
            "description": "List of variable Ids, If specified, only variables matching these Ids will be returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SourceId",
            "in": "query",
            "description": "A single source Id. If specified, only variables attached to this source will be returned.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SourceIds",
            "in": "query",
            "description": "List of sources Ids. If specified, only variables attached to these sources will be returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "VariableTypeId",
            "in": "query",
            "description": "Variable type Id. If specified, only variables of the specified type will be returned.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "VariableTypeIds",
            "in": "query",
            "description": "List of variable types Ids. If specified, only variables of the specified types will be returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "ManualEntryVariablesOnly",
            "in": "query",
            "description": "If true, only manual variables will be returned.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeAllAccounts",
            "in": "query",
            "description": "Return all variables belonging to all accounts. (ADMIN ONLY - DEPRECATED)",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "AccountId",
            "in": "query",
            "description": "Return all variables belonging the specified account Id. If not set, the account the current user will be used. (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "MappingConfig",
            "in": "query",
            "description": "Variable mapping config. If specified, only variables having the specified mapping config will be returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "CalculatedFilter.ImpactingVariableId",
            "in": "query",
            "description": "Impacting variable Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "CalculatedFilter.ImpactingVariableIds",
            "in": "query",
            "description": "List of impacting variables Ids.",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "CalculatedFilter.Id",
            "in": "query",
            "description": "Calculated variable Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Name",
            "in": "query",
            "description": "Variable name. If specified, only variables having the specified name will be returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Tags",
            "in": "query",
            "description": "List of tags. If specified, only variables having at least one of the specified tags will be returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "Groups",
            "in": "query",
            "description": "List of groups. If specified, only variables having at least one of the specified group will be returned.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "OnlyUngrouped",
            "in": "query",
            "description": "If enabled, only variables without group will be returned?",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.Variable"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/variables/{variableId}/countdatapoints": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Get the count of data points comprised in a given period of time",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "From.AsIso8601",
            "in": "query",
            "description": "ISO8601 representation (YYYY-MM-DDThh:mm:ss[.mmm]TZD) of the date/time\nWhere:\n  YYYY = four-digit year\n  MM = two-digit month(eg 03=March)\n  DD = two-digit day of the month(01 through 31)\n  T = a set character indicating the start of the time element\n  hh = two digits of an hour(00 through 23, AM/PM not included)\n  mm = two digits of a minute(00 through 59)\n  ss = two digits of a second(00 through 59)\n  mmm = three digits of a millisecond(000 through 999)\n  TZD = time zone designator(Z or +hh:mm or -hh:mm), the + or - values indicate how far ahead or behind a time zone is from the UTC(Coordinated Universal Time) zone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "From.AsEpoch",
            "in": "query",
            "description": "The number of seconds that have elapsed since 1970-01-01T00:00:00Z",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "To.AsIso8601",
            "in": "query",
            "description": "ISO8601 representation (YYYY-MM-DDThh:mm:ss[.mmm]TZD) of the date/time\nWhere:\n  YYYY = four-digit year\n  MM = two-digit month(eg 03=March)\n  DD = two-digit day of the month(01 through 31)\n  T = a set character indicating the start of the time element\n  hh = two digits of an hour(00 through 23, AM/PM not included)\n  mm = two digits of a minute(00 through 59)\n  ss = two digits of a second(00 through 59)\n  mmm = three digits of a millisecond(000 through 999)\n  TZD = time zone designator(Z or +hh:mm or -hh:mm), the + or - values indicate how far ahead or behind a time zone is from the UTC(Coordinated Universal Time) zone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "To.AsEpoch",
            "in": "query",
            "description": "The number of seconds that have elapsed since 1970-01-01T00:00:00Z",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "IncludeToBoundary",
            "in": "query",
            "description": "If set, include \"To\" date in date range.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          }
        }
      }
    },
    "/variables/{variableId}/statistics": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Get statistics over variable data points related to a threshold value and a period of time",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "variableId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "From.AsIso8601",
            "in": "query",
            "description": "ISO8601 representation (YYYY-MM-DDThh:mm:ss[.mmm]TZD) of the date/time\nWhere:\n  YYYY = four-digit year\n  MM = two-digit month(eg 03=March)\n  DD = two-digit day of the month(01 through 31)\n  T = a set character indicating the start of the time element\n  hh = two digits of an hour(00 through 23, AM/PM not included)\n  mm = two digits of a minute(00 through 59)\n  ss = two digits of a second(00 through 59)\n  mmm = three digits of a millisecond(000 through 999)\n  TZD = time zone designator(Z or +hh:mm or -hh:mm), the + or - values indicate how far ahead or behind a time zone is from the UTC(Coordinated Universal Time) zone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "From.AsEpoch",
            "in": "query",
            "description": "The number of seconds that have elapsed since 1970-01-01T00:00:00Z",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "To.AsIso8601",
            "in": "query",
            "description": "ISO8601 representation (YYYY-MM-DDThh:mm:ss[.mmm]TZD) of the date/time\nWhere:\n  YYYY = four-digit year\n  MM = two-digit month(eg 03=March)\n  DD = two-digit day of the month(01 through 31)\n  T = a set character indicating the start of the time element\n  hh = two digits of an hour(00 through 23, AM/PM not included)\n  mm = two digits of a minute(00 through 59)\n  ss = two digits of a second(00 through 59)\n  mmm = three digits of a millisecond(000 through 999)\n  TZD = time zone designator(Z or +hh:mm or -hh:mm), the + or - values indicate how far ahead or behind a time zone is from the UTC(Coordinated Universal Time) zone.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "To.AsEpoch",
            "in": "query",
            "description": "The number of seconds that have elapsed since 1970-01-01T00:00:00Z",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "IncludeToBoundary",
            "in": "query",
            "description": "If set, include \"To\" date in date range.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ThresholdValue",
            "in": "query",
            "description": "The threshold value. A data point value is considered BELOW threshold if value is lower than the threshold value.\nA data point value is considered ABOVE threshold if value is higher than or equal to the threshold value.",
            "required": true,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "UseReportingTimezone",
            "in": "query",
            "description": "If set, the API converts all dates to the variable's parent site TimeZone.\nThis parameter can't be set if TimeZoneId is specified.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "TimeZoneId",
            "in": "query",
            "description": "If set, the API converts all dates to the specified TimeZoneId. A TimeZoneId is a string corresponding to the name of the time zone.\nThe list of time zones is available at https://support.microsoft.com/en-nz/help/973627/microsoft-time-zone-index-values (BCL) and at https://www.iana.org/time-zones (IANA/TZDB).\nThis parameter can't be set if UseReportingTimezone is set.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ResultAggregation",
            "in": "query",
            "description": "If specified, aggregate the statistics by the specified period",
            "schema": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.VariableStatisticsAggregation"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.VariableStatisticsResponseDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/variables/engines": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Gets Calculated Variable Engines.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "AccountId",
            "in": "query",
            "description": "Account ID. (ADMIN ONLY)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Variable"
        ],
        "summary": "Creates Calculated Variable Engine.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
                }
              }
            }
          }
        }
      }
    },
    "/variables/engines/{engineId}": {
      "put": {
        "tags": [
          "Variable"
        ],
        "summary": "Updates Calculated Variable Engine.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "engineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Variable"
        ],
        "summary": "Updates Calculated Variable Engine.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "engineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.DeleteEngineResult"
                }
              }
            }
          }
        }
      }
    },
    "/variables/engines/{engineId}/default": {
      "post": {
        "tags": [
          "Variable"
        ],
        "summary": "Set as default Calculated Variable Engine.",
        "description": "Allowed for: MANAGER, ADMIN",
        "parameters": [
          {
            "name": "engineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.SetDefaultEngineRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.SetDefaultEngineRequest"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.SetDefaultEngineRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.SetDefaultEngineResult"
                }
              }
            }
          }
        }
      }
    },
    "/variables/engines/{engineId}/usage": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Set as default Calculated Variable Engine for the current Account.",
        "description": "Allowed for: ADMIN",
        "parameters": [
          {
            "name": "engineId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.EngineUsage"
                }
              }
            }
          }
        }
      }
    },
    "/variables/periodTypes": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Gets Calculated Variable Period Types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/variables/source/{sourceId}": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Gets all variables for source.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Opinum.Api.Core.Models.Variable"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Variable"
        ],
        "summary": "Creates a new Variable for a source.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "sourceId",
            "in": "path",
            "description": "The source identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "noProcessingRequired",
            "in": "query",
            "description": "True if not processing data is required upon creation",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "requestBody": {
          "description": "The definition of the variable to create",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.VerboseVariable"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.VerboseVariable"
              }
            },
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/Opinum.Api.Core.Models.VerboseVariable"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Opinum.Api.Core.Models.VerboseVariable"
                }
              }
            }
          }
        }
      }
    },
    "/variables/types": {
      "get": {
        "tags": [
          "Variable"
        ],
        "summary": "Gets all variable types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Id",
            "in": "query",
            "description": "Variable type Id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VariableType"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/variableTypes": {
      "get": {
        "tags": [
          "Metadata"
        ],
        "summary": "Gets the variable types.",
        "description": "Allowed for: ALL USERS",
        "parameters": [
          {
            "name": "Api-Version",
            "in": "header",
            "description": "The requested API version",
            "schema": {
              "enum": [
                "1.7"
              ],
              "type": "string",
              "default": "1.7"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.VariableType"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnergyImpact.Shared.Core.Accounts.AccountDisplayLevel": {
        "enum": [
          "Normal",
          "Light"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Alert.Alert": {
        "required": [
          "FriendlyName",
          "SiteId",
          "SourceId",
          "VariableId"
        ],
        "type": "object",
        "properties": {
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "Id": {
            "type": "integer",
            "description": "Alert Id.",
            "format": "int32"
          },
          "SiteId": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32"
          },
          "VariableId": {
            "type": "integer",
            "description": "Variable Id.",
            "format": "int32"
          },
          "FriendlyName": {
            "minLength": 1,
            "type": "string",
            "description": "Alert name."
          },
          "AlertThresholdType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertThresholdType"
          },
          "CreatedBy": {
            "type": "string",
            "description": "Alert creation user.",
            "nullable": true
          },
          "CreatedDate": {
            "type": "string",
            "description": "Alert creation date.",
            "format": "date-time"
          },
          "Granularity": {
            "type": "number",
            "description": "Granularity value.",
            "format": "double",
            "nullable": true
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Alert last update user.",
            "nullable": true
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Alert last update date.",
            "format": "date-time"
          },
          "Value": {
            "type": "number",
            "description": "Alert value.",
            "format": "double",
            "nullable": true
          },
          "State": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertState"
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertType"
          },
          "AggregationType": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "ScheduleNextExecutionDate": {
            "type": "string",
            "description": "Schedule interval unit.",
            "format": "date-time",
            "nullable": true
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertNotification"
            },
            "description": "Alert notifications.",
            "nullable": true
          },
          "Exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertException"
            },
            "description": "Alert exceptions.",
            "nullable": true
          },
          "ScheduleConfig": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertScheduleConfig"
          },
          "ImpactingVariableIds": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of variable that trigger the alert.",
            "nullable": true
          },
          "Cron": {
            "type": "string",
            "description": "Cron expression used to schedule (See https://crontab.guru/).",
            "nullable": true
          },
          "IsAdvancedCron": {
            "type": "boolean",
            "description": "If cron is used in advanced mode.",
            "nullable": true
          },
          "CronGap": {
            "type": "string",
            "description": "Cron gap.",
            "format": "date-span",
            "nullable": true
          },
          "Count": {
            "type": "integer",
            "description": "Alert occurrences count.",
            "format": "int32",
            "nullable": true
          },
          "RawDataAgeFilter": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.RawDataAgeFilter"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Alert.AlertException": {
        "type": "object",
        "properties": {
          "From": {
            "type": "string",
            "description": "Exception begin date.",
            "format": "date-time"
          },
          "To": {
            "type": "string",
            "description": "Exception end date.",
            "format": "date-time"
          },
          "Reason": {
            "type": "string",
            "description": "Exception reason.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Alert.AlertNotification": {
        "type": "object",
        "properties": {
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.NotificationType"
          },
          "Target": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertNotificationTarget"
          },
          "Value": {
            "type": "string",
            "description": "Alert notifications value.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Alert.AlertNotificationMetadata": {
        "type": "object",
        "properties": {
          "EmailTrackingId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Alert.AlertNotificationTarget": {
        "enum": [
          "User",
          "Custom"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Alert.AlertOccurrence": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Alert history Id.",
            "nullable": true
          },
          "AlertId": {
            "type": "integer",
            "description": "Alert Id.",
            "format": "int32"
          },
          "Status": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertOccurrenceStatus"
          },
          "CreatedDate": {
            "type": "string",
            "description": "Alert history creation date.",
            "format": "date-time"
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Last alert history update date.",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Last user Id that update this alert history.",
            "nullable": true
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertOccurrenceNotification"
            },
            "description": "Alert history notifications.",
            "nullable": true
          },
          "Value": {
            "type": "number",
            "description": "Alert history value.",
            "format": "double",
            "nullable": true
          },
          "BeginDate": {
            "type": "string",
            "description": "Alert history begin date.",
            "format": "date-time",
            "nullable": true
          },
          "EndDate": {
            "type": "string",
            "description": "Alert history end date.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Alert.AlertOccurrenceNotification": {
        "type": "object",
        "properties": {
          "AlertNotification": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertNotification"
          },
          "AlertNotificationMetadata": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertNotificationMetadata"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Alert.AlertOccurrenceStatus": {
        "enum": [
          "New",
          "InProgress",
          "Closed"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Alert.AlertScheduleConfig": {
        "type": "object",
        "properties": {
          "ScheduleId": {
            "type": "integer",
            "description": "Schedule id.",
            "format": "int32",
            "nullable": true
          },
          "ScheduleLevelIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Schedule level id.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Alert.AlertState": {
        "enum": [
          "Active",
          "Inactive"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Alert.AlertThresholdType": {
        "enum": [
          "Low",
          "High"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Alert.AlertType": {
        "enum": [
          "Raw",
          "Rolling",
          "Scheduled"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Alert.NotificationType": {
        "enum": [
          "Email",
          "Sms",
          "Webhook",
          "Event"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Alert.RawDataAgeFilter": {
        "type": "object",
        "properties": {
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.RawDataAgeFilterType"
          },
          "RelativePeriod": {
            "type": "string",
            "description": "Datapoints older than this RelativePeriod won't be check by the alert",
            "format": "date-span"
          },
          "NumberOfPeriods": {
            "type": "integer",
            "description": "A multiplier for the RelativePeriod. This will be mainly used for GranularityBasedPeriod, allowing to\nspecify e.g. 10 times the granularity of the variable",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Alert's data age filter\nIs used to filter out datapoints to trigger alerts on"
      },
      "EnergyImpact.Shared.Core.Alert.RawDataAgeFilterType": {
        "enum": [
          "NoFilter",
          "RelativePeriod",
          "GranularityBasedPeriod"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariable": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Id = Calculated variable Id.",
            "format": "int32"
          },
          "FriendlyName": {
            "type": "string",
            "description": "Variable name.",
            "nullable": true
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Last user Id that update this variable.",
            "nullable": true
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Last update date.",
            "format": "date-time"
          },
          "CalculatedVariableFormulas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormula"
            },
            "description": "List of calculated variable formulas.",
            "nullable": true
          },
          "IsCalculatedAtRuntime": {
            "type": "boolean",
            "description": "If this calculated variable is calculated on runtime."
          },
          "ImpactingVariableIds": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of impacted variables ids.",
            "nullable": true
          },
          "EngineId": {
            "type": "string",
            "description": "The processing engine to use.\nThe available engines are defined at the Account level\nIf not defined, R language version 3.4.4 (2018-03-15) will be used",
            "nullable": true
          },
          "Disabled": {
            "type": "boolean"
          },
          "ForceDisabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableDependencyConstant": {
        "type": "object",
        "properties": {
          "Value": {
            "type": "number",
            "description": "Constant value.",
            "format": "double"
          },
          "Alias": {
            "type": "string",
            "description": "Constant alias.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableDependencyEntity": {
        "type": "object",
        "properties": {
          "Alias": {
            "type": "string",
            "description": "Alias.",
            "nullable": true
          },
          "EntityType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.EntityType"
          },
          "SiteId": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "VariableId": {
            "type": "integer",
            "description": "Variable Id.",
            "format": "int32"
          },
          "FormId": {
            "type": "string",
            "description": "Form Id",
            "nullable": true
          },
          "GroupId": {
            "type": "integer",
            "description": "Form group Id.",
            "format": "int32"
          },
          "PropId": {
            "type": "string",
            "description": "Form property Id.",
            "nullable": true
          },
          "EntityId": {
            "type": "integer",
            "description": "Entity type.",
            "format": "int32",
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormula": {
        "required": [
          "Formula"
        ],
        "type": "object",
        "properties": {
          "Formula": {
            "minLength": 1,
            "type": "string",
            "description": "Formula"
          },
          "ValidFrom": {
            "type": "string",
            "description": "Formula validity start date.",
            "format": "date-time",
            "nullable": true
          },
          "ValidUntil": {
            "type": "string",
            "description": "Formula validity end date.",
            "format": "date-time",
            "nullable": true
          },
          "Variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariables.CalculatedVariableDependencyVariable"
            },
            "description": "List of variable datasources used in the formula.",
            "nullable": true
          },
          "Entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableDependencyEntity"
            },
            "description": "List of entities datasources used on the formula.",
            "nullable": true
          },
          "Constants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableDependencyConstant"
            },
            "description": "List of constants used on the formula.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableFormulaAndEngine": {
        "required": [
          "Formula"
        ],
        "type": "object",
        "properties": {
          "EngineId": {
            "type": "string",
            "nullable": true
          },
          "ReferenceDate": {
            "type": "string",
            "format": "date-time"
          },
          "Formula": {
            "minLength": 1,
            "type": "string",
            "description": "Formula"
          },
          "ValidFrom": {
            "type": "string",
            "description": "Formula validity start date.",
            "format": "date-time",
            "nullable": true
          },
          "ValidUntil": {
            "type": "string",
            "description": "Formula validity end date.",
            "format": "date-time",
            "nullable": true
          },
          "Variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariables.CalculatedVariableDependencyVariable"
            },
            "description": "List of variable datasources used in the formula.",
            "nullable": true
          },
          "Entities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableDependencyEntity"
            },
            "description": "List of entities datasources used on the formula.",
            "nullable": true
          },
          "Constants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariableDependencyConstant"
            },
            "description": "List of constants used on the formula.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.CalculatedVariables.ValidationResult": {
        "type": "object",
        "properties": {
          "IsValid": {
            "type": "boolean"
          },
          "Errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.CalculatedVariables.ValidationResultData": {
        "type": "object",
        "properties": {
          "Data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opisense.Models.Shared.DataPoint"
            },
            "nullable": true
          },
          "IsValid": {
            "type": "boolean"
          },
          "Errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Constants.ClaimsConstants_FeatureInfo": {
        "type": "object",
        "properties": {
          "FeatureName": {
            "type": "string",
            "description": "Feature name.",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "description": "Feature value.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.DataQuality.DataQualityNotification": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Notification Id.",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.NotificationType"
          },
          "Target": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertNotificationTarget"
          },
          "Value": {
            "type": "string",
            "description": "Notification target value.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.DataQuality.DataQualityOverride": {
        "required": [
          "IngestionDelay",
          "IngestionDelayTimeBase",
          "IngestionFrequency",
          "IngestionFrequencyTimeBase"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Data quality override Id.",
            "format": "int32"
          },
          "VariableId": {
            "type": "integer",
            "description": "Variable Id.",
            "format": "int32"
          },
          "State": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.DataQualityOverrideState"
          },
          "IngestionFrequency": {
            "type": "number",
            "description": "ingestion frequency.",
            "format": "double"
          },
          "IngestionFrequencyTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "IngestionDelay": {
            "type": "number",
            "description": "Ingestion delay.",
            "format": "double"
          },
          "IngestionDelayTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.DataQuality.DataQualityOverrideState": {
        "enum": [
          "Disabled",
          "Enabled"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.DataQuality.DataQualitySourceStatus": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Request Id.",
            "format": "int32"
          },
          "IsCurrentlyValid": {
            "type": "boolean",
            "description": "If the current state is valid.",
            "nullable": true
          },
          "WasPreviouslyValid": {
            "type": "boolean",
            "description": "If the previous state is valid.",
            "nullable": true
          },
          "LatestDatapointDate": {
            "type": "string",
            "description": "Date of the last datapoint.",
            "format": "date-time",
            "nullable": true
          },
          "LastCheckedDate": {
            "type": "string",
            "description": "Date of the last quality check.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.DataQuality.DataQualityTemplate": {
        "required": [
          "EnergyTypeId",
          "GatewayTypeId",
          "IngestionDelay",
          "IngestionDelayTimeBase",
          "IngestionFrequency",
          "IngestionFrequencyTimeBase",
          "SourceTypeId",
          "VariableTypeId"
        ],
        "type": "object",
        "properties": {
          "GatewayTypeId": {
            "type": "integer",
            "description": "Gateway type Id (Cannot be updated).",
            "format": "int32"
          },
          "SourceTypeId": {
            "type": "integer",
            "description": "Source type Id (Cannot be updated).",
            "format": "int32"
          },
          "EnergyTypeId": {
            "type": "integer",
            "description": "Energy type Id (Cannot be updated).",
            "format": "int32"
          },
          "VariableTypeId": {
            "type": "integer",
            "description": "Variable type Id (Cannot be updated).",
            "format": "int32"
          },
          "IngestionFrequency": {
            "type": "number",
            "description": "ingestion frequency.",
            "format": "double"
          },
          "IngestionFrequencyTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "IngestionDelay": {
            "type": "number",
            "description": "Ingestion delay.",
            "format": "double"
          },
          "IngestionDelayTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.DataQuality.TimePeriod": {
        "enum": [
          "Second",
          "Minute",
          "Hour",
          "Day",
          "Week",
          "Month",
          "Year"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Datas.DataDisplayLevel": {
        "enum": [
          "Value",
          "ValueVariable",
          "ValueVariableDate",
          "ValueVariableDateSource"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Datas.OrderByDirection": {
        "enum": [
          "ASC",
          "DESC"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Datas.PublicDataFilter": {
        "type": "object",
        "properties": {
          "DisplayLevel": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.DataDisplayLevel"
          },
          "Granularity": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Granularity"
          },
          "From": {
            "type": "string",
            "description": "The start date (included in the date range). \nThis date is considered to be expressed in the TimeZone defined by \"TimeZoneId\" or \"UseReportingTimezone\"",
            "format": "date-time",
            "nullable": true
          },
          "To": {
            "type": "string",
            "description": "The end date (included in the date range if IncludeToBoundary is set). \nThis date is considered to be expressed in the TimeZone defined by \"TimeZoneId\" or \"UseReportingTimezone\"",
            "format": "date-time",
            "nullable": true
          },
          "IncludeToBoundary": {
            "type": "boolean",
            "description": "If set, include \"To\" date in date range."
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32",
            "nullable": true
          },
          "SourceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of source ids.",
            "nullable": true
          },
          "VariableId": {
            "type": "integer",
            "description": "Variable Id.",
            "format": "int32",
            "nullable": true
          },
          "VariableIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of variable ids.",
            "nullable": true
          },
          "VariableTypeId": {
            "type": "integer",
            "description": "Variable type id.",
            "format": "int32",
            "nullable": true
          },
          "VariableTypeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of variable type ids.",
            "nullable": true
          },
          "Aggregation": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "Aggregations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
            },
            "description": "A list of aggregations.\nThis parameter can't be set if the granularity is raw.",
            "nullable": true
          },
          "UseReportingTimezone": {
            "type": "boolean",
            "description": "If set, the API converts all dates to the variable's parent site TimeZone.\nThis parameter can't be set if TimeZoneId is specified."
          },
          "TimeZoneId": {
            "type": "string",
            "description": "If set, the API converts all dates to the specified TimeZoneId. A TimeZoneId is a string corresponding to the name of the time zone.\nThe list of time zones is available at https://docs.microsoft.com/en-us/previous-versions/windows/embedded/gg154758(v=winembedded.80) (BCL) and at https://www.iana.org/time-zones (IANA/TZDB).\nThis parameter can't be set if UseReportingTimezone is set.",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "The account restricting the data extraction (ADMIN ONLY).\nThis parameter can't be set if IncludeAllAccounts is set.\nFor non ADMIN users, the account Id is retrieved from the user's credentials.",
            "format": "int32",
            "nullable": true
          },
          "Paging": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Paging"
          },
          "PagingOrder": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Datas.OrderByDirection"
          },
          "TargetUnits": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of target units (unit or symbol).",
            "nullable": true
          },
          "UnitTransformation": {
            "type": "boolean",
            "description": "If data units will be transform to the first compatible target unit."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.ErrorCodes.ErrorCode": {
        "required": [
          "Code",
          "Description",
          "Priority",
          "SearchText"
        ],
        "type": "object",
        "properties": {
          "Code": {
            "minLength": 1,
            "type": "string",
            "description": "Error code."
          },
          "Description": {
            "minLength": 1,
            "type": "string",
            "description": "Error description."
          },
          "SearchText": {
            "minLength": 1,
            "type": "string",
            "description": "Search text to find the corresponding exception."
          },
          "Priority": {
            "type": "integer",
            "description": "Error priority.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Events.Event": {
        "required": [
          "FromDate",
          "Name",
          "SiteId",
          "SourceIds",
          "ToDate"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Event Id.",
            "format": "int32"
          },
          "ClientData": {
            "description": "Client forms",
            "nullable": true
          },
          "SystemData": {
            "description": "System forms",
            "nullable": true
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Event name"
          },
          "Info": {
            "type": "string",
            "description": "Event info",
            "nullable": true
          },
          "SourceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of source ids."
          },
          "SiteId": {
            "type": "integer",
            "description": "Site Id",
            "format": "int32"
          },
          "FromDate": {
            "type": "string",
            "description": "From date",
            "format": "date-time"
          },
          "ToDate": {
            "type": "string",
            "description": "To date",
            "format": "date-time"
          },
          "TimeRangeType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.TimeRangeTypes"
          },
          "EventType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Events.EventTypes"
          },
          "Tags": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tags",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Events.EventTypes": {
        "enum": [
          "User",
          "Alert",
          "Alarm"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Events.TimeRangeTypes": {
        "enum": [
          "SingleDate",
          "TimeRange"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Forms.Dependency": {
        "type": "object",
        "properties": {
          "DependsOnFieldId": {
            "type": "integer",
            "description": "The field id that this depends on",
            "format": "int32"
          },
          "DependsOnType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.DependencyType"
          },
          "DependsOnListValue": {
            "description": "The list value the the related field id must be in order to meet the dependency (Only required when DependsOnType is 'Value')",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a field dependency (used in Field.Dependency)\nis used in Data Hub to display the field only of the dependency is met (i.e. another field is of a given value)"
      },
      "EnergyImpact.Shared.Core.Forms.DependencyType": {
        "enum": [
          "Value",
          "Null",
          "NotNull"
        ],
        "type": "string",
        "description": "Represents the dependecy type"
      },
      "EnergyImpact.Shared.Core.Forms.EntityType": {
        "enum": [
          "Site",
          "Source",
          "Event"
        ],
        "type": "string",
        "description": "Represents the entity types (Site, Source,..)"
      },
      "EnergyImpact.Shared.Core.Forms.FieldItem": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Id",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Name",
            "nullable": true
          },
          "Value": {
            "description": "Value",
            "nullable": true
          },
          "Localisations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Localisation"
            },
            "description": "List of localization",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Forms.FieldType": {
        "enum": [
          "String",
          "Int",
          "Double",
          "Password",
          "Date",
          "LongString",
          "Boolean",
          "DateOnly"
        ],
        "type": "string",
        "description": "Represents field types (Number, Text,...)"
      },
      "EnergyImpact.Shared.Core.Forms.Form": {
        "required": [
          "EntityType",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.FormType"
          },
          "Id": {
            "type": "string",
            "description": "the form Identifier. Can be left empty when creating a new form"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "the form name"
          },
          "DisplayOrder": {
            "type": "integer",
            "description": "the display order (Optional), used to display the fields in given order in Data Hub",
            "format": "int32"
          },
          "AccountId": {
            "type": "integer",
            "description": "the account id, this will be set by the system.",
            "format": "int32"
          },
          "EntityType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.EntityType"
          },
          "Localisations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Localisation"
            },
            "description": "the form name localisations (Optional)",
            "nullable": true
          },
          "Groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.FormGroup"
            },
            "description": "the form groups (Optional)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a form (custom defined fields)"
      },
      "EnergyImpact.Shared.Core.Forms.FormGroup": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "the group Identifier. Can be left empty on creation",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "the group name"
          },
          "DisplayOrder": {
            "type": "integer",
            "description": "the display order (Optional), used to display the fields in given order in Data Hub",
            "format": "int32"
          },
          "DisplayHeader": {
            "type": "boolean",
            "description": "Whether the group name is displayed in Data Hub (Optional),"
          },
          "Localisations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Localisation"
            },
            "description": "the group name localisations (Optional)",
            "nullable": true
          },
          "Fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.GroupField"
            },
            "description": "the group fields (Optional)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a form group (used in Form.Groups)"
      },
      "EnergyImpact.Shared.Core.Forms.FormType": {
        "enum": [
          "Account",
          "System"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Forms.GroupField": {
        "required": [
          "Name",
          "Type"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "the field Identifier. Can be left empty on creation",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "the field name"
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.FieldType"
          },
          "DisplayOrder": {
            "type": "integer",
            "description": "the display order (Optional), used to display the fields in given order in Data Hub",
            "format": "int32"
          },
          "Required": {
            "type": "boolean",
            "description": "whether a value for this field is required by Data Hub when editing an entity (Optional, Defaults:false)"
          },
          "TimeSliced": {
            "type": "boolean",
            "description": "Whether the values for this field are historically tracked (Optional, Defaults:false)\nOnly valid for Source Forms."
          },
          "Localisations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Localisation"
            },
            "description": "the field name localisations (Optional)",
            "nullable": true
          },
          "Dependency": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.Dependency"
          },
          "IsList": {
            "type": "boolean",
            "description": "whether the field is represented as a List (Optional, Defaults:false)"
          },
          "Items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Forms.FieldItem"
            },
            "description": "the list items that are used when the field is a list (Optional)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a field (used in Group.Fields)"
      },
      "EnergyImpact.Shared.Core.Forms.Localisation": {
        "type": "object",
        "properties": {
          "Culture": {
            "type": "string",
            "description": "The language (EN, FR, NL, DE, ..)",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "description": "The value in the language given in the Culture property",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a locatisation (i.e. My group in German)"
      },
      "EnergyImpact.Shared.Core.Gateway.Gateway": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Gateway Id.",
            "format": "int32"
          },
          "GatewayTypeId": {
            "type": "integer",
            "description": "GatewayTypeId.",
            "format": "int32"
          },
          "SimId": {
            "type": "string",
            "description": "Gateway sim Id.",
            "nullable": true
          },
          "SerialNumber": {
            "type": "string",
            "description": "Gateway serial number.",
            "nullable": true
          },
          "Metadata": {
            "type": "string",
            "description": "Gateway metadata.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Gateway.GatewayType": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Gateway type Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Gateway type name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Invitations.ExistingInvitation": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "minLength": 1,
            "type": "string",
            "description": "Invitation Id."
          },
          "AccountId": {
            "type": "integer",
            "description": "Invitation on the specified account (ADMIN ONLY)",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Invitations.Invitation": {
        "required": [
          "Email",
          "FirstName",
          "LastName",
          "Roles"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Invitation Id.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.InvitationType"
          },
          "AccountId": {
            "type": "integer",
            "description": "Invitation on the specified account (ADMIN ONLY)",
            "format": "int32",
            "nullable": true
          },
          "Token": {
            "type": "string",
            "description": "Invitation token.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "Creation date.",
            "format": "date-time",
            "nullable": true
          },
          "UsedOn": {
            "type": "string",
            "description": "Date of usage.",
            "format": "date-time",
            "nullable": true
          },
          "UserId": {
            "type": "string",
            "description": "User created with.",
            "nullable": true
          },
          "Email": {
            "minLength": 1,
            "type": "string",
            "description": "Email address.",
            "format": "email"
          },
          "Roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.Role"
            },
            "description": "Invitation users role."
          },
          "Features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
            },
            "description": "Invitation users features (/account/features)",
            "nullable": true
          },
          "Sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.SiteAccess"
            },
            "description": "List of accessible sites",
            "nullable": true
          },
          "SecondaryAccesses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserFeature"
            },
            "description": "Allowed applications (Data Hub,Site Care,Data Hub index --> /account/secondaryAccesses)",
            "nullable": true
          },
          "FirstName": {
            "minLength": 1,
            "type": "string",
            "description": "First name."
          },
          "LastName": {
            "minLength": 1,
            "type": "string",
            "description": "Last name."
          },
          "ClientId": {
            "type": "string",
            "description": "Client Id.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Invitations.InvitationNotifications.InvitationNotification": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Notification Id.",
            "format": "int32"
          },
          "InvitationId": {
            "type": "string",
            "description": "Invitation Id.",
            "nullable": true
          },
          "TrackingId": {
            "type": "string",
            "description": "Tracking Id.",
            "nullable": true
          },
          "Date": {
            "type": "string",
            "description": "Notification date.",
            "format": "date-time"
          },
          "Email": {
            "type": "string",
            "description": "Invitation email.",
            "nullable": true
          },
          "Copy": {
            "type": "boolean",
            "description": "If send copy send to me."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Invitations.InvitationType": {
        "enum": [
          "Normal",
          "Smart"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Invitations.SiteAccess": {
        "required": [
          "SourceIds"
        ],
        "type": "object",
        "properties": {
          "SiteId": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32"
          },
          "SourceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of source Ids."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Invoices.Invoice": {
        "required": [
          "Date",
          "InvoiceNumber",
          "Price",
          "SourceId",
          "Type"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Invoice Id.",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.InvoiceType"
          },
          "Status": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invoices.InvoiceStatus"
          },
          "InvoiceNumber": {
            "minLength": 1,
            "type": "string",
            "description": "Invoice number."
          },
          "Date": {
            "type": "string",
            "description": "Invoice date.",
            "format": "date-time"
          },
          "Price": {
            "type": "number",
            "description": "Invoice amount excluding VAT.",
            "format": "double"
          },
          "Amount": {
            "type": "number",
            "description": "Quantity (Required if Type=Regularization).",
            "format": "double",
            "nullable": true
          },
          "UnitId": {
            "type": "integer",
            "description": "Unit Id (Required if Type=Regularization).",
            "format": "int32",
            "nullable": true
          },
          "DeltaActualAmount": {
            "type": "number",
            "description": "Difference between invoice and actual consumption",
            "format": "double",
            "nullable": true
          },
          "PriceVat": {
            "type": "number",
            "description": "Invoice amount including VAT.",
            "format": "double",
            "nullable": true
          },
          "PeriodFrom": {
            "type": "string",
            "description": "Invoice from date (Required if Type=Regularization).",
            "format": "date-time",
            "nullable": true
          },
          "PeriodTo": {
            "type": "string",
            "description": "Invoice to date (Required if Type=Regularization. Must be must be greater than PeriodFrom).",
            "format": "date-time",
            "nullable": true
          },
          "CloudItemId": {
            "type": "integer",
            "description": "Invoice cloud item Id (to download file).",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Invoices.InvoiceStatus": {
        "enum": [
          "None",
          "Paid",
          "Overdue",
          "Unpaid"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Invoices.InvoiceType": {
        "enum": [
          "AdvancePayment",
          "Regularization",
          "Adjustment"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.AccountAuthorization": {
        "type": "object",
        "properties": {
          "Enabled": {
            "type": "boolean"
          },
          "AuthorizationType": {
            "type": "string",
            "nullable": true
          },
          "AuthorizationId": {
            "type": "string",
            "format": "uuid"
          },
          "Provider": {
            "type": "string",
            "nullable": true
          },
          "Url": {
            "type": "string",
            "nullable": true
          },
          "ApiKey": {
            "type": "string",
            "nullable": true
          },
          "ApiToken": {
            "type": "string",
            "nullable": true
          },
          "User": {
            "type": "string",
            "nullable": true
          },
          "Password": {
            "type": "string",
            "nullable": true
          },
          "MaxUsagePerMonth": {
            "type": "integer",
            "format": "int64"
          },
          "CurrentMonthUsage": {
            "type": "integer",
            "format": "int64"
          },
          "CurrentMonth": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.AccountNameAndKeyAuthenticationContext": {
        "required": [
          "AccountKey",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Account name."
          },
          "AccountKey": {
            "minLength": 1,
            "type": "string",
            "description": "Account key."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.AccountType": {
        "enum": [
          "Trial",
          "Smart",
          "Enterprise",
          "Demo"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.AlertOccurrenceUpdateRequest": {
        "required": [
          "AlertId",
          "AlertOccurrenceIds",
          "Status"
        ],
        "type": "object",
        "properties": {
          "Status": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.AlertOccurrenceStatus"
          },
          "AlertOccurrenceIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of alert occurrence ids."
          },
          "AlertId": {
            "type": "integer",
            "description": "Alert Id.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.AlertViewDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Temporary": {
            "type": "boolean"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.SortDto"
            },
            "nullable": true
          },
          "Columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Views.Column"
            },
            "nullable": true
          },
          "Filter": {
            "$ref": "#/components/schemas/Opinum.Api.Core.FilterViewDto"
          },
          "Usages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.ViewUsageDto"
            },
            "nullable": true
          },
          "SharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Api.Core.SharedWithinTheAccountDto"
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.UserSharingDto"
            },
            "nullable": true
          },
          "TotalWidth": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.BasicAuthenticationAndApiKeyContext": {
        "required": [
          "ApiKey",
          "Password",
          "Username"
        ],
        "type": "object",
        "properties": {
          "Username": {
            "minLength": 1,
            "type": "string",
            "description": "User name."
          },
          "Password": {
            "minLength": 1,
            "type": "string",
            "description": "Password."
          },
          "ApiKey": {
            "minLength": 1,
            "type": "string",
            "description": "Api Key."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.BasicAuthenticationContext": {
        "required": [
          "Password",
          "Username"
        ],
        "type": "object",
        "properties": {
          "Username": {
            "minLength": 1,
            "type": "string",
            "description": "User name."
          },
          "Password": {
            "minLength": 1,
            "type": "string",
            "description": "Password."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.ConnectionStringAuthenticationContext": {
        "required": [
          "ConnectionString",
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Name"
          },
          "ConnectionString": {
            "minLength": 1,
            "type": "string",
            "description": "Connection string."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.DataPusher": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Device Id.",
            "format": "int32"
          },
          "DeviceName": {
            "type": "string",
            "description": "Device name.",
            "nullable": true
          },
          "Claim": {
            "type": "string",
            "description": "Claim.",
            "nullable": true
          },
          "Disabled": {
            "type": "integer",
            "description": "Device status",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.EmailSettings": {
        "type": "object",
        "properties": {
          "SenderAddress": {
            "type": "string",
            "description": "Sender email address",
            "nullable": true
          },
          "UseCustomServer": {
            "type": "boolean",
            "description": "A custom email server is used?"
          },
          "ServerUrl": {
            "type": "string",
            "description": "Custom email server url",
            "nullable": true
          },
          "ServerPort": {
            "type": "integer",
            "description": "Custom email server port",
            "format": "int32"
          },
          "UseSsl": {
            "type": "boolean",
            "description": "Connect to custom server using ssl?"
          },
          "RequiresAuthentication": {
            "type": "boolean",
            "description": "Custom email required authentication?"
          },
          "Username": {
            "type": "string",
            "description": "Custom email server username",
            "nullable": true
          },
          "Password": {
            "type": "string",
            "description": "Custom email server password",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.EmailViewModel": {
        "required": [
          "Email"
        ],
        "type": "object",
        "properties": {
          "Email": {
            "minLength": 1,
            "type": "string",
            "format": "email"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.EnergyType": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Energy type Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Energy type name.",
            "nullable": true
          },
          "EnergyUsages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EnergyUsage"
            },
            "description": "List of usages.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.EnergyUsage": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Energy usage Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Energy usage name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.EnvironmentType": {
        "enum": [
          "Test",
          "PreProd",
          "Prod"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.FileExtentionValidationRequest": {
        "type": "object",
        "properties": {
          "Filename": {
            "type": "string",
            "description": "The name of file",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.FtpConnectionType": {
        "enum": [
          "Ftp",
          "Ftps",
          "Sftp"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.FtpCredentials": {
        "required": [
          "ConnectionType",
          "Password",
          "Url",
          "UserName"
        ],
        "type": "object",
        "properties": {
          "Url": {
            "minLength": 1,
            "type": "string",
            "description": "Server url."
          },
          "UserName": {
            "minLength": 1,
            "type": "string",
            "description": "User name."
          },
          "Password": {
            "minLength": 1,
            "type": "string",
            "description": "Password."
          },
          "ConnectionType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.FtpConnectionType"
          },
          "Certificate": {
            "type": "string",
            "description": "SSL certificate.",
            "nullable": true
          },
          "Passphrase": {
            "type": "string",
            "description": "Certificate passphrase.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Granularity": {
        "enum": [
          "Raw",
          "Minute",
          "Hour",
          "Day",
          "Month",
          "Year",
          "All",
          "Week"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.InvitationViewModel": {
        "type": "object",
        "properties": {
          "Token": {
            "type": "string",
            "description": "Invitation token.",
            "nullable": true
          },
          "State": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.TokenState"
          },
          "InvitedBy": {
            "type": "string",
            "description": "User that send the invitation.",
            "nullable": true
          },
          "CreatedOn": {
            "type": "string",
            "description": "Invitation creation date.",
            "format": "date-time"
          },
          "Email": {
            "type": "string",
            "description": "Target user email.",
            "nullable": true
          },
          "FirstName": {
            "type": "string",
            "description": "Target user first name.",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "description": "Target user last name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Location": {
        "type": "object",
        "properties": {
          "Longitude": {
            "type": "number",
            "description": "Longitude.",
            "format": "double"
          },
          "Latitude": {
            "type": "number",
            "description": "Latitude.",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.ManageUser": {
        "required": [
          "NewPassword",
          "OldPassword"
        ],
        "type": "object",
        "properties": {
          "OldPassword": {
            "minLength": 1,
            "type": "string",
            "description": "Current password.",
            "format": "password"
          },
          "NewPassword": {
            "maxLength": 100,
            "minLength": 6,
            "type": "string",
            "description": "New password.",
            "format": "password"
          },
          "ConfirmPassword": {
            "type": "string",
            "description": "Confirm new password.",
            "format": "password",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.NameValue": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "Gets or sets the name.",
            "nullable": true
          },
          "Value": {
            "description": "Gets or sets the value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Name - Value object"
      },
      "EnergyImpact.Shared.Core.Models.Paging": {
        "type": "object",
        "properties": {
          "PageNumber": {
            "type": "integer",
            "description": "The page number (Optional, must be >= 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "format": "int32",
            "nullable": true
          },
          "ItemsPerPage": {
            "type": "integer",
            "description": "The number of items per page (Optional, must be > 0)\nHint:   setting PageNumber = 0, ItemsPerPage = 1, PagingOrder = \"DESC\" returns the last data point of the specified variables",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a page filter"
      },
      "EnergyImpact.Shared.Core.Models.PostRole": {
        "required": [
          "UserId"
        ],
        "type": "object",
        "properties": {
          "Roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.Role"
            },
            "description": "List of roles.",
            "nullable": true
          },
          "UserId": {
            "minLength": 1,
            "type": "string",
            "description": "User Id."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Register": {
        "required": [
          "ConfirmPassword",
          "Email",
          "FirstName",
          "LastName",
          "Password"
        ],
        "type": "object",
        "properties": {
          "Email": {
            "minLength": 1,
            "type": "string",
            "description": "Email address.",
            "format": "email"
          },
          "Password": {
            "maxLength": 100,
            "minLength": 6,
            "type": "string",
            "description": "Password",
            "format": "password"
          },
          "ConfirmPassword": {
            "minLength": 1,
            "type": "string",
            "description": "Password confirmation.",
            "format": "password"
          },
          "FirstName": {
            "minLength": 1,
            "type": "string",
            "description": "First name.",
            "format": "string"
          },
          "LastName": {
            "minLength": 1,
            "type": "string",
            "description": "Last name.",
            "format": "string"
          },
          "Invitation": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.InvitationViewModel"
          },
          "ClientId": {
            "type": "string",
            "description": "Client Id.",
            "nullable": true
          },
          "Tenant": {
            "type": "string",
            "description": "",
            "nullable": true
          },
          "ReturnUrl": {
            "type": "string",
            "description": "",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.RemoveRole": {
        "required": [
          "RoleId",
          "UserId"
        ],
        "type": "object",
        "properties": {
          "UserId": {
            "minLength": 1,
            "type": "string",
            "description": "User Id."
          },
          "RoleId": {
            "minLength": 1,
            "type": "string",
            "description": "Role Id."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.SendBackEmailInvitation": {
        "type": "object",
        "properties": {
          "Invitation": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Invitations.ExistingInvitation"
          },
          "SendAlsoToMe": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Sim": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "minLength": 1,
            "type": "string",
            "description": "Sim Id."
          },
          "IpAddress": {
            "type": "string",
            "description": "Ip address (DEPRECATED).",
            "nullable": true,
            "deprecated": true
          },
          "Phone": {
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "SimProviderId": {
            "type": "integer",
            "description": "Sim provider Id.",
            "format": "int32"
          },
          "IpAddressNew": {
            "type": "string",
            "description": "Ip address.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.SimProvider": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.SiteLight": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Site name."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.SiteType": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Site type Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Site type name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.SiteVerboseSource": {
        "required": [
          "Name",
          "SiteId",
          "TimeZoneId"
        ],
        "type": "object",
        "properties": {
          "SiteId": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32"
          },
          "SiteName": {
            "type": "string",
            "description": "Site name.",
            "nullable": true
          },
          "SerialNumber": {
            "type": "string",
            "description": "Serial number.",
            "nullable": true
          },
          "SimId": {
            "type": "string",
            "description": "Sim Id.",
            "nullable": true
          },
          "DisplayVariableTypeId": {
            "type": "integer",
            "description": "Display variable type Id.",
            "format": "int32",
            "nullable": true
          },
          "GatewayId": {
            "type": "integer",
            "description": "Gateway Id.",
            "format": "int32"
          },
          "GatewayTypeId": {
            "type": "integer",
            "description": "Gateway type Id.",
            "format": "int32"
          },
          "MeterAddress": {
            "type": "string",
            "description": "Address of the source in the gateway.\nCannot be modified by the end user.",
            "nullable": true
          },
          "ClientData": {
            "description": "Client forms\nRepresents the client data (based on the form definitions).\nHas the following shape:\n{\n   MyForm1:{\n     MyGroup1:{\n        MyField1:10\n        MyField2: \"something\"\n     }\n  },\n  MyForm2:{}\n}",
            "nullable": true
          },
          "SystemData": {
            "description": "System forms",
            "nullable": true
          },
          "EanNumber": {
            "type": "string",
            "description": "EAN number.",
            "nullable": true
          },
          "MeterNumber": {
            "type": "string",
            "description": "Meter number.",
            "nullable": true
          },
          "Localisation": {
            "type": "string",
            "description": "Localization.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Source description.",
            "nullable": true
          },
          "Tags": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tags.",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "EnergyTypeId": {
            "type": "integer",
            "description": "Energy type Id.",
            "format": "int32"
          },
          "EnergyUsageId": {
            "type": "integer",
            "description": "Energy usage Id.",
            "format": "int32",
            "nullable": true
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Source name."
          },
          "SourceTypeId": {
            "type": "integer",
            "description": "Source type Id.",
            "format": "int32"
          },
          "TimeZoneId": {
            "minLength": 1,
            "type": "string",
            "description": "Time zone Id."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.SmsSettings": {
        "type": "object",
        "properties": {
          "UseSmsService": {
            "type": "boolean",
            "description": "Sms settings enabled?"
          },
          "GatewayApiAuthToken": {
            "type": "string",
            "description": "GatewayAPI AuthToken",
            "nullable": true
          },
          "GatewayApiPhoneNumber": {
            "type": "string",
            "description": "GatewayAPI PhoneNumber",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.SourceState": {
        "enum": [
          "Enabled",
          "Disabled",
          "Archived",
          "Deleted"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.SourceType": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Source type Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Source type name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.StorageItemTag": {
        "enum": [
          "None",
          "Template",
          "Invoice",
          "MapForceProcessed",
          "Dataset",
          "MasterDataTemplate",
          "MasterDataTemplateError",
          "MasterDataUploadWhatif",
          "MasterDataTemplateJson"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.Timezone": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Time zone Id.",
            "nullable": true
          },
          "DisplayName": {
            "type": "string",
            "description": "Time zone name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.TokenState": {
        "enum": [
          "Valid",
          "Invalid",
          "AlreadyUsed",
          "Expired"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.Triggers.BaseFileTriggerMetadata": {
        "type": "object",
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Triggers.FileNamePatternMatching": {
        "type": "object",
        "properties": {
          "FilterType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.TriggerFilterType"
          },
          "Value": {
            "type": "string",
            "description": "Value.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Triggers.FileTrigger": {
        "required": [
          "FileNamePatternMatches"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "File trigger Id.",
            "format": "int32"
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "FileType": {
            "description": "File type. (int or string)",
            "nullable": true
          },
          "TriggerType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.TriggerType"
          },
          "FileNamePatternMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileNamePatternMatching"
            },
            "description": "List of triggers."
          },
          "State": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTriggerState"
          },
          "Metadata": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.BaseFileTriggerMetadata"
          },
          "FileTriggerCombination": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTriggerCombination"
          },
          "Token": {
            "type": "string",
            "description": "Token.",
            "format": "uuid",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "description": "Creation date.",
            "format": "date-time"
          },
          "CreatedBy": {
            "type": "string",
            "description": "Creator.",
            "nullable": true
          },
          "LastEditDate": {
            "type": "string",
            "description": "Last edit date.",
            "format": "date-time",
            "nullable": true
          },
          "EditedBy": {
            "type": "string",
            "description": "Last editor.",
            "nullable": true
          },
          "IngestionType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.IngestionTypes"
          },
          "IsWebhookTrigger": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Triggers.FileTriggerCombination": {
        "enum": [
          "Or",
          "And"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.Triggers.FileTriggerState": {
        "enum": [
          "Active",
          "Inactive",
          "Deleted",
          "Updated"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.Triggers.IngestionTypes": {
        "enum": [
          "SendViaFtp",
          "UploadInStorage",
          "SendViaHttp"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.Triggers.TriggerFilterType": {
        "enum": [
          "Contains",
          "NotContains",
          "StartsWith",
          "NotStartsWith",
          "NotEndsWith",
          "EndsWith",
          "Equals",
          "NotEquals"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.Triggers.TriggerType": {
        "enum": [
          "Added"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Models.Triggers.UpdatedFileTrigger": {
        "required": [
          "FileNamePatternMatches"
        ],
        "type": "object",
        "properties": {
          "JsonMetadata": {
            "type": "string",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "description": "File trigger Id.",
            "format": "int32"
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "FileType": {
            "description": "File type. (int or string)",
            "nullable": true
          },
          "TriggerType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.TriggerType"
          },
          "FileNamePatternMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileNamePatternMatching"
            },
            "description": "List of triggers."
          },
          "State": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTriggerState"
          },
          "Metadata": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.BaseFileTriggerMetadata"
          },
          "FileTriggerCombination": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.FileTriggerCombination"
          },
          "Token": {
            "type": "string",
            "description": "Token.",
            "format": "uuid",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "description": "Creation date.",
            "format": "date-time"
          },
          "CreatedBy": {
            "type": "string",
            "description": "Creator.",
            "nullable": true
          },
          "LastEditDate": {
            "type": "string",
            "description": "Last edit date.",
            "format": "date-time",
            "nullable": true
          },
          "EditedBy": {
            "type": "string",
            "description": "Last editor.",
            "nullable": true
          },
          "IngestionType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Triggers.IngestionTypes"
          },
          "IsWebhookTrigger": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.Unit": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Unit Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Unit name.",
            "nullable": true
          },
          "Symbol": {
            "type": "string",
            "description": "Unit symbol.",
            "nullable": true
          },
          "ParentId": {
            "type": "integer",
            "description": "Parent unit Id.",
            "format": "int32"
          },
          "Divisor": {
            "type": "number",
            "description": "Divisor value based on parent unit.",
            "format": "double"
          },
          "Offset": {
            "type": "number",
            "description": "Unit offset (ex: Subtract 32° to adjust for the offset in the Fahrenheit scale)",
            "format": "double"
          },
          "UnitFamilyId": {
            "type": "integer",
            "description": "Unit family Id (use to set a name on a group of unit).",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.UnitFamily": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Unit family Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Unit family name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.UserLock": {
        "required": [
          "IsLocked",
          "UserId"
        ],
        "type": "object",
        "properties": {
          "UserId": {
            "minLength": 1,
            "type": "string",
            "description": "User Id."
          },
          "IsLocked": {
            "type": "boolean",
            "description": "If the user is locked."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.UserSearchRequest": {
        "required": [
          "ItemsPerPage",
          "PageNumber"
        ],
        "type": "object",
        "properties": {
          "PageNumber": {
            "type": "integer",
            "description": "The page number (Must be >= 0)",
            "format": "int32"
          },
          "ItemsPerPage": {
            "type": "integer",
            "description": "The items per page (Must be > 0)",
            "format": "int32"
          },
          "SearchText": {
            "type": "string",
            "description": "Search text (search on pseudo, first name, last name and email)",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id. (ADMIN ONLY)",
            "format": "int32",
            "nullable": true
          },
          "IncludeRoles": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.UserSearchResponse": {
        "type": "object",
        "properties": {
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
            },
            "nullable": true
          },
          "Page": {
            "type": "integer",
            "format": "int32"
          },
          "IsLastPage": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.VariableType": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Variable type Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Variable type name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.VerboseSite": {
        "required": [
          "Name",
          "TimeZoneId",
          "TypeId"
        ],
        "type": "object",
        "properties": {
          "ManuallyDefinedGeoPoint": {
            "type": "boolean",
            "description": "Set if the location is manually set or calculated based on address"
          },
          "Location": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Location"
          },
          "ClientData": {
            "description": "Client forms\nRepresents the client data (based on the form definitions).\nHas the following shape:\n{\n   MyForm1:{\n     MyGroup1:{\n        MyField1:10\n        MyField2: \"something\"\n     }\n  },\n  MyForm2:{}\n}",
            "nullable": true
          },
          "SystemData": {
            "description": "System forms",
            "nullable": true
          },
          "TypeId": {
            "type": "integer",
            "description": "Site type Id.",
            "format": "int32"
          },
          "Street": {
            "type": "string",
            "description": "Street name.",
            "nullable": true
          },
          "PostalCode": {
            "type": "string",
            "description": "Postal code.",
            "nullable": true
          },
          "City": {
            "type": "string",
            "description": "City.",
            "nullable": true
          },
          "Country": {
            "type": "string",
            "description": "Country.",
            "nullable": true
          },
          "TimeZoneId": {
            "minLength": 1,
            "type": "string",
            "description": "Time zone Id."
          },
          "Id": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Site name."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Models.VerboseSource": {
        "required": [
          "Name",
          "TimeZoneId"
        ],
        "type": "object",
        "properties": {
          "SerialNumber": {
            "type": "string",
            "description": "Serial number.",
            "nullable": true
          },
          "SimId": {
            "type": "string",
            "description": "Sim Id.",
            "nullable": true
          },
          "DisplayVariableTypeId": {
            "type": "integer",
            "description": "Display variable type Id.",
            "format": "int32",
            "nullable": true
          },
          "GatewayId": {
            "type": "integer",
            "description": "Gateway Id.",
            "format": "int32"
          },
          "GatewayTypeId": {
            "type": "integer",
            "description": "Gateway type Id.",
            "format": "int32"
          },
          "MeterAddress": {
            "type": "string",
            "description": "Address of the source in the gateway.\nCannot be modified by the end user.",
            "nullable": true
          },
          "ClientData": {
            "description": "Client forms\nRepresents the client data (based on the form definitions).\nHas the following shape:\n{\n   MyForm1:{\n     MyGroup1:{\n        MyField1:10\n        MyField2: \"something\"\n     }\n  },\n  MyForm2:{}\n}",
            "nullable": true
          },
          "SystemData": {
            "description": "System forms",
            "nullable": true
          },
          "EanNumber": {
            "type": "string",
            "description": "EAN number.",
            "nullable": true
          },
          "MeterNumber": {
            "type": "string",
            "description": "Meter number.",
            "nullable": true
          },
          "Localisation": {
            "type": "string",
            "description": "Localization.",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "description": "Source description.",
            "nullable": true
          },
          "Tags": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tags.",
            "nullable": true
          },
          "Id": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "EnergyTypeId": {
            "type": "integer",
            "description": "Energy type Id.",
            "format": "int32"
          },
          "EnergyUsageId": {
            "type": "integer",
            "description": "Energy usage Id.",
            "format": "int32",
            "nullable": true
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Source name."
          },
          "SourceTypeId": {
            "type": "integer",
            "description": "Source type Id.",
            "format": "int32"
          },
          "TimeZoneId": {
            "minLength": 1,
            "type": "string",
            "description": "Time zone Id."
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistory": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Id.",
            "format": "int32"
          },
          "TrackingId": {
            "type": "string",
            "description": "Tracking Id.",
            "format": "uuid"
          },
          "StatusName": {
            "type": "string",
            "description": "Status name (state).",
            "nullable": true
          },
          "UpdateDate": {
            "type": "string",
            "description": "Update date.",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistoryPlivo": {
        "type": "object",
        "properties": {
          "Status": {
            "type": "string",
            "description": "Status",
            "nullable": true
          },
          "MessageUUID": {
            "type": "string",
            "description": "Tracking Id.",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.NotificationMessageStatusHistory.NotificationMessageStatusHistorySendgrid": {
        "type": "object",
        "properties": {
          "Timestamp": {
            "type": "integer",
            "description": "Timestamp",
            "format": "int64"
          },
          "Event": {
            "type": "string",
            "description": "Event",
            "nullable": true
          },
          "opinumMessageId": {
            "type": "string",
            "description": "Tracking Id.",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Schedules.Schedule": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Schedule Id.",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Schedule name."
          },
          "GatewayId": {
            "type": "integer",
            "description": "Gateway Id.",
            "format": "int32",
            "nullable": true
          },
          "SiteId": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Schedules.ScheduleException": {
        "required": [
          "From",
          "LevelId",
          "Reason",
          "To"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Schedule exception Id.",
            "format": "int32"
          },
          "ScheduleId": {
            "type": "integer",
            "description": "Schedule Id.",
            "format": "int32"
          },
          "From": {
            "type": "string",
            "description": "Exception from date.",
            "format": "date-time"
          },
          "To": {
            "type": "string",
            "description": "Exception to date.",
            "format": "date-time"
          },
          "Reason": {
            "minLength": 1,
            "type": "string",
            "description": "Exception reason."
          },
          "LevelId": {
            "type": "integer",
            "description": "Exception level Id.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Schedules.ScheduleLevel": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Schedule level Id.",
            "format": "int32",
            "nullable": true
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Schedule level name."
          },
          "Value": {
            "type": "number",
            "description": "Schedule level value;",
            "format": "double"
          },
          "IsDefault": {
            "type": "boolean",
            "description": "If ths schedule level id the default schedule level."
          },
          "Color": {
            "type": "integer",
            "description": "Schedule level color.",
            "format": "int32"
          },
          "RemoteEnumId": {
            "type": "integer",
            "description": "Technical id level on the remote device.",
            "format": "int32",
            "deprecated": true
          },
          "RemoteId": {
            "type": "integer",
            "description": "Technical id on the remote device.",
            "format": "int32",
            "deprecated": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Schedules.ScheduleTick": {
        "required": [
          "From",
          "LevelId",
          "ScheduleId",
          "To"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Schedule tick Id.",
            "format": "int32"
          },
          "ScheduleId": {
            "type": "integer",
            "description": "Schedule Id.",
            "format": "int32"
          },
          "From": {
            "type": "string",
            "description": "Schedule tick from date.",
            "format": "date-time"
          },
          "To": {
            "type": "string",
            "description": "Schedule tick to date.",
            "format": "date-time"
          },
          "LevelId": {
            "type": "integer",
            "description": "Schedule level Id.",
            "format": "int32"
          },
          "RemoteId": {
            "type": "integer",
            "description": "Technical id on the remote device.",
            "format": "int32",
            "deprecated": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Security.AccountExternalServiceCredential": {
        "type": "object",
        "properties": {
          "ServiceProvider": {
            "type": "string",
            "description": "Service provider;",
            "nullable": true
          },
          "ServiceKey": {
            "type": "string",
            "description": "Service key.",
            "nullable": true
          },
          "SecretKey": {
            "type": "string",
            "description": "Secret key.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Security.ExternalServiceCredential": {
        "type": "object",
        "properties": {
          "ServiceProvider": {
            "type": "string",
            "description": "Service provider;",
            "nullable": true
          },
          "ServiceKey": {
            "type": "string",
            "description": "Service key.",
            "nullable": true
          },
          "SecretKey": {
            "type": "string",
            "description": "Secret key.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType": {
        "enum": [
          "User",
          "Account"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Security.UserExternalServiceCredential": {
        "type": "object",
        "properties": {
          "UserId": {
            "type": "string",
            "description": "User Id.",
            "nullable": true
          },
          "ServiceProvider": {
            "type": "string",
            "description": "Service provider;",
            "nullable": true
          },
          "ServiceKey": {
            "type": "string",
            "description": "Service key.",
            "nullable": true
          },
          "SecretKey": {
            "type": "string",
            "description": "Secret key.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.ExternalServiceCredentialType"
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Sites.SiteDisplayLevel": {
        "enum": [
          "Site",
          "SiteLight",
          "VerboseSite"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Sources.History.SourceHistory": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Source history Id.",
            "format": "int32"
          },
          "Date": {
            "type": "string",
            "description": "Event date.",
            "format": "date-time"
          },
          "UserId": {
            "type": "string",
            "description": "User Id.",
            "nullable": true
          },
          "Type": {
            "type": "string",
            "description": "Event type.",
            "nullable": true
          },
          "Value": {
            "description": "Event value.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Sources.Notes.SourceNote": {
        "required": [
          "Value"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Note Id.",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "Date": {
            "type": "string",
            "description": "Note date.",
            "format": "date-time"
          },
          "Value": {
            "minLength": 1,
            "type": "string",
            "description": "Note value."
          },
          "UserId": {
            "type": "string",
            "description": "Note creator.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnergyImpact.Shared.Core.Sources.SourceDisplayLevel": {
        "enum": [
          "Light",
          "Normal",
          "Verbose",
          "Site"
        ],
        "type": "string"
      },
      "EnergyImpact.Shared.Core.Variables.VariableDisplaylevel": {
        "enum": [
          "Normal",
          "Verbose"
        ],
        "type": "string"
      },
      "Google.Protobuf.WellKnownTypes.Duration": {
        "type": "object",
        "properties": {
          "Seconds": {
            "type": "integer",
            "format": "int64"
          },
          "Nanos": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.JsonPatch.JsonPatchDocument": {
        "type": "object",
        "properties": {
          "Operations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.Operations.Operation"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Microsoft.AspNetCore.JsonPatch.Operations.Operation": {
        "type": "object",
        "properties": {
          "value": {
            "nullable": true
          },
          "path": {
            "type": "string",
            "nullable": true
          },
          "op": {
            "type": "string",
            "nullable": true
          },
          "from": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OpiSense.Api.ControllersV1Dot3.ReportTemplateController_ReportTemplateDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Report template Id.",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Name",
            "nullable": true
          },
          "CreatedBy": {
            "type": "string",
            "description": "Creator.",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "description": "Creation date.",
            "format": "date-time"
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Last editor.",
            "nullable": true
          },
          "UpdateDate": {
            "type": "string",
            "description": "Last edition date.",
            "format": "date-time",
            "nullable": true
          },
          "TemplateType": {
            "$ref": "#/components/schemas/OpiSense.Api.ControllersV1Dot3.ReportTemplateController_TemplateType"
          },
          "CloudItemId": {
            "type": "integer",
            "description": "CloudItemId (Only if TemplateType = CloudItem)",
            "format": "int32",
            "nullable": true
          },
          "Body": {
            "type": "string",
            "description": "Template Body (Only if TemplateType = ScribanText)",
            "nullable": true
          },
          "OutputExtension": {
            "type": "string",
            "nullable": true
          },
          "TemplateFormat": {
            "type": "integer",
            "description": "Template format Id (Only if TemplateType = ScribanText. Only used on the UI)",
            "format": "int32",
            "nullable": true
          },
          "ReferenceReportId": {
            "type": "integer",
            "description": "Referece report Id. (Only if TemplateType = ScribanText. Only used on the UI)",
            "format": "int32",
            "nullable": true
          },
          "Version": {
            "type": "integer",
            "description": "Version of the template engine. (Only if TemplateType = ScribanText)",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OpiSense.Api.ControllersV1Dot3.ReportTemplateController_TemplateType": {
        "enum": [
          "CloudItem",
          "ScribanText"
        ],
        "type": "string"
      },
      "Opinum.Accounts.V1.AccountType": {
        "enum": [
          "NotSpecified",
          "Trial",
          "Smart",
          "Enterprise",
          "Demo"
        ],
        "type": "string"
      },
      "Opinum.Accounts.V1.DefaultAlertConfig": {
        "type": "object",
        "properties": {
          "DefaultDataAgeFilter": {
            "$ref": "#/components/schemas/Opinum.Accounts.V1.RawDataAgeFilter"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Accounts.V1.ImpersonationStatus": {
        "enum": [
          "Disabled",
          "Enabled",
          "EnabledWithUserConsent"
        ],
        "type": "string"
      },
      "Opinum.Accounts.V1.RawDataAgeFilter": {
        "type": "object",
        "properties": {
          "Type": {
            "$ref": "#/components/schemas/Opinum.Accounts.V1.RawDataAgeFilterType"
          },
          "RelativePeriod": {
            "$ref": "#/components/schemas/Google.Protobuf.WellKnownTypes.Duration"
          },
          "NumberOfPeriods": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Accounts.V1.RawDataAgeFilterType": {
        "enum": [
          "NoFilter",
          "RelativePeriod",
          "GranularityBasedPeriod"
        ],
        "type": "string"
      },
      "Opinum.Accounts.V1.ReportsConfig": {
        "type": "object",
        "properties": {
          "Language": {
            "type": "string",
            "nullable": true
          },
          "DefaultTemplate": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Accounts.Account": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Account id (Required on update).",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Account name"
          },
          "SubscriptionId": {
            "type": "string",
            "description": "Account subscription id",
            "nullable": true
          },
          "CustomProductName": {
            "type": "string",
            "description": "Custom product name",
            "nullable": true
          },
          "AccountImpersonationStatus": {
            "$ref": "#/components/schemas/Opinum.Accounts.V1.ImpersonationStatus"
          },
          "OpinumSupportImpersonationStatus": {
            "$ref": "#/components/schemas/Opinum.Accounts.V1.ImpersonationStatus"
          },
          "Type": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AccountType"
          },
          "CreationDate": {
            "type": "string",
            "description": "Account creation date.",
            "format": "date-time"
          },
          "EndOfTrial": {
            "type": "string",
            "description": "End of account trial.",
            "format": "date-time"
          },
          "EnvironmentType": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EnvironmentType"
          },
          "Themes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.Theme"
            },
            "description": "Account themes",
            "nullable": true
          },
          "EmailSettings": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.EmailSettings"
          },
          "UnitPreferences": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Account unit preferences",
            "nullable": true
          },
          "SmsSettings": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.SmsSettings"
          },
          "Sites": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of account's sites",
            "nullable": true
          },
          "Sources": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of account's sources",
            "nullable": true
          },
          "Events": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of account's event",
            "nullable": true
          },
          "FileTypes": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of account's filesTypes",
            "nullable": true
          },
          "MapForceFiles": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of account's map force files",
            "nullable": true
          },
          "Schedules": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Ids of account's schedules",
            "nullable": true
          },
          "ExternalServiceCredential": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Security.AccountExternalServiceCredential"
            },
            "description": "Ids of account's external services credentials",
            "nullable": true
          },
          "ContactReference": {
            "type": "string",
            "nullable": true
          },
          "Authorizations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.AccountAuthorization"
            },
            "description": "A list of authorizations granted to this account",
            "nullable": true
          },
          "AlertConfiguration": {
            "$ref": "#/components/schemas/Opinum.Accounts.V1.DefaultAlertConfig"
          },
          "ReportsConfiguration": {
            "$ref": "#/components/schemas/Opinum.Accounts.V1.ReportsConfig"
          },
          "Settings": {
            "description": "JSON formatted additional settings",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "description": "Account language",
            "nullable": true
          },
          "OrganizationId": {
            "type": "string",
            "description": "Organization this account belongs to",
            "nullable": true
          },
          "Timezone": {
            "type": "string",
            "description": "Account timezone (Windows time zone ID, e.g. \"Romance Standard Time\").",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Accounts.ClaimMapping": {
        "type": "object",
        "properties": {
          "OpisenseClaim": {
            "type": "string",
            "nullable": true
          },
          "IdpClaim": {
            "type": "string",
            "nullable": true
          },
          "StaticValue": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Accounts.IdentityProvider": {
        "type": "object",
        "properties": {
          "WsFederation": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.WsFederationIdentityProvider"
          },
          "OpenIdConnect": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.OpenIdConnectIdentityProvider"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Accounts.OpenIdConnectIdentityProvider": {
        "type": "object",
        "properties": {
          "MetadataAddress": {
            "type": "string",
            "nullable": true
          },
          "RedirectUri": {
            "type": "string",
            "nullable": true
          },
          "Wtrealm": {
            "type": "string",
            "nullable": true
          },
          "ClaimMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.ClaimMapping"
            },
            "nullable": true
          },
          "ClientId": {
            "type": "string",
            "nullable": true
          },
          "ClientSecret": {
            "type": "string",
            "nullable": true
          },
          "EmailWhiteList": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Accounts.Theme": {
        "type": "object",
        "properties": {
          "ApplicationHost": {
            "type": "string",
            "description": "Base application url (ex: http://datahub.opinum.com)",
            "nullable": true
          },
          "DefaultLanguageCode": {
            "type": "string",
            "description": "Default language code (ex: \"EN\")",
            "nullable": true,
            "deprecated": true
          },
          "Name": {
            "type": "string",
            "description": "Theme name.",
            "nullable": true
          },
          "TechnicalName": {
            "type": "string",
            "description": "Theme technical name.",
            "nullable": true
          },
          "ClientId": {
            "type": "string",
            "description": "Client id.",
            "nullable": true
          },
          "DefaultTheme": {
            "type": "boolean",
            "description": "Is default theme?"
          },
          "EmailDirectory": {
            "type": "string",
            "description": "Email directory",
            "nullable": true
          },
          "EmailBaseUrl": {
            "type": "string",
            "description": "Email template url",
            "nullable": true
          },
          "EmailLinkedImages": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Email Linked Images",
            "nullable": true
          },
          "IdentityProvider": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.IdentityProvider"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Accounts.WsFederationIdentityProvider": {
        "type": "object",
        "properties": {
          "MetadataAddress": {
            "type": "string",
            "nullable": true
          },
          "CallbackPath": {
            "type": "string",
            "nullable": true
          },
          "Wtrealm": {
            "type": "string",
            "nullable": true
          },
          "ClaimMappings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Accounts.ClaimMapping"
            },
            "nullable": true
          },
          "SignOutWreply": {
            "type": "string",
            "nullable": true
          },
          "CertificateThumbprint": {
            "type": "string",
            "nullable": true
          },
          "EmailWhiteList": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngine": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "string",
            "nullable": true
          },
          "EngineType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngineType"
          },
          "EngineVersion": {
            "type": "string",
            "nullable": true
          },
          "IsDefault": {
            "type": "boolean"
          },
          "IsAvailableToAllAccounts": {
            "type": "boolean"
          },
          "AvailableForAccounts": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariableEngines.Models.CalculatedVariableEngineType": {
        "enum": [
          "R"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.CalculatedVariableEngines.Models.DeleteEngineResult": {
        "type": "object",
        "properties": {
          "IsSuccess": {
            "type": "boolean"
          },
          "ErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "VariablesUsingEngine": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariableEngines.Models.EngineUsage": {
        "type": "object",
        "properties": {
          "IsGlobalEngine": {
            "type": "boolean"
          },
          "AccountsUsage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariableEngines.Models.EngineUsage_AccountUsage"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariableEngines.Models.EngineUsage_AccountUsage": {
        "type": "object",
        "properties": {
          "AccountId": {
            "type": "integer",
            "format": "int32"
          },
          "VariablesCount": {
            "type": "integer",
            "format": "int32"
          },
          "IsDefaultEngine": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariableEngines.Models.SetDefaultEngineRequest": {
        "type": "object",
        "properties": {
          "Global": {
            "type": "boolean",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariableEngines.Models.SetDefaultEngineResult": {
        "type": "object",
        "properties": {
          "IsSuccess": {
            "type": "boolean"
          },
          "ErrorMessage": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariables.CalculatedVariableDependencyVariable": {
        "required": [
          "Alias",
          "CanBeUsedAsATrigger",
          "Granularity",
          "PeriodType",
          "SiteId",
          "SourceId",
          "UnitId",
          "VariableId"
        ],
        "type": "object",
        "properties": {
          "Alias": {
            "minLength": 1,
            "type": "string",
            "description": "Datasource alias (name)"
          },
          "SiteId": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "VariableId": {
            "type": "integer",
            "description": "Variable Id.",
            "format": "int32"
          },
          "Granularity": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.Granularity"
          },
          "Aggregation": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "PeriodType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariables.PeriodType"
          },
          "RelativePeriodType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.CalculatedVariables.RelativePeriodType"
          },
          "Period": {
            "type": "number",
            "description": "Period value.",
            "format": "double"
          },
          "PeriodTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "FuturePeriodGranularity": {
            "type": "number",
            "format": "double"
          },
          "FuturePeriodGranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "FromAbsolutePeriod": {
            "type": "string",
            "description": "Period from date.",
            "format": "date-time",
            "nullable": true
          },
          "ToAbsolutePeriod": {
            "type": "string",
            "description": "Period to date.",
            "format": "date-time",
            "nullable": true
          },
          "UnitId": {
            "type": "integer",
            "description": "Unit Id.",
            "format": "int32"
          },
          "CanBeUsedAsATrigger": {
            "type": "boolean",
            "description": "If this datasource can be used as trigger."
          },
          "MasterDataSourceAlias": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.CalculatedVariables.PeriodType": {
        "enum": [
          "RelativeDate",
          "AbsoluteDate",
          "LastNPoints"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.CalculatedVariables.RelativePeriodType": {
        "enum": [
          "InThePastAndFuture",
          "InThePast",
          "InTheFuture"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.FilterViewDto": {
        "type": "object",
        "properties": {
          "Filters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.FilterViewDto"
            },
            "nullable": true
          },
          "Logic": {
            "$ref": "#/components/schemas/Opinum.Views.Logic"
          },
          "Field": {
            "type": "string",
            "nullable": true
          },
          "Operator": {
            "$ref": "#/components/schemas/Opinum.Views.OperatorApi"
          },
          "Value": {
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.AccountConfigurationDto": {
        "type": "object",
        "properties": {
          "sectionName": {
            "type": "string",
            "nullable": true
          },
          "configuration": {
            "$ref": "#/components/schemas/System.Text.Json.JsonElement"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.DataLossVariable": {
        "type": "object",
        "properties": {
          "OriginalVariableId": {
            "type": "integer",
            "format": "int32"
          },
          "AbnormalPeriodFactor": {
            "type": "integer",
            "format": "int32"
          },
          "MissingSignalFactor": {
            "type": "integer",
            "format": "int32"
          },
          "DetectionState": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.DetectionState"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.Language": {
        "type": "object",
        "properties": {
          "Code": {
            "type": "string",
            "description": "Language code.",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "description": "Language name.",
            "nullable": true
          },
          "TechnicalCode": {
            "type": "string",
            "description": "Language technical code",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.LinkResponse": {
        "type": "object",
        "properties": {
          "Link": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.QuantityType": {
        "enum": [
          "Instantaneous",
          "Integrated",
          "Cumulative",
          "Minimum",
          "Maximum",
          "Averaged"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Models.ReportViewDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Temporary": {
            "type": "boolean"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.SortDto"
            },
            "nullable": true
          },
          "Columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Views.Column"
            },
            "nullable": true
          },
          "Filter": {
            "$ref": "#/components/schemas/Opinum.Api.Core.FilterViewDto"
          },
          "Usages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.ViewUsageDto"
            },
            "nullable": true
          },
          "SharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Api.Core.SharedWithinTheAccountDto"
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.UserSharingDto"
            },
            "nullable": true
          },
          "TotalWidth": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.Response": {
        "type": "object",
        "properties": {
          "Messages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "IsError": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.SavedViewDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Temporary": {
            "type": "boolean"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Filter": {
            "$ref": "#/components/schemas/Opinum.Api.Core.FilterViewDto"
          },
          "Sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.SortDto"
            },
            "nullable": true
          },
          "Columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Views.Column"
            },
            "nullable": true
          },
          "Usages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.ViewUsageDto"
            },
            "nullable": true
          },
          "OdmSqlFilter": {
            "type": "string",
            "nullable": true
          },
          "CustomFilter": {
            "type": "string",
            "nullable": true
          },
          "SharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Api.Core.SharedWithinTheAccountDto"
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.UserSharingDto"
            },
            "nullable": true
          },
          "TotalWidth": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.SiteViewDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Temporary": {
            "type": "boolean"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.SortDto"
            },
            "nullable": true
          },
          "Columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Views.Column"
            },
            "nullable": true
          },
          "Filter": {
            "$ref": "#/components/schemas/Opinum.Api.Core.FilterViewDto"
          },
          "SharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Api.Core.SharedWithinTheAccountDto"
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.UserSharingDto"
            },
            "nullable": true
          },
          "CustomFilter": {
            "type": "string",
            "nullable": true
          },
          "Usages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.ViewUsageDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.ValueData": {
        "type": "object",
        "properties": {
          "RawValue": {
            "type": "number",
            "description": "Value without aggregation.",
            "format": "double",
            "nullable": true
          },
          "MinValue": {
            "type": "number",
            "description": "Minimum.",
            "format": "double",
            "nullable": true
          },
          "MaxValue": {
            "type": "number",
            "description": "Maximum.",
            "format": "double",
            "nullable": true
          },
          "CountValue": {
            "type": "number",
            "description": "Number of values.",
            "format": "double",
            "nullable": true
          },
          "AvgValue": {
            "type": "number",
            "description": "Average.",
            "format": "double",
            "nullable": true
          },
          "StdevValue": {
            "type": "number",
            "description": "Standard deviation.",
            "format": "double",
            "nullable": true
          },
          "VarianceValue": {
            "type": "number",
            "description": "Variance.",
            "format": "double",
            "nullable": true
          },
          "SumValue": {
            "type": "number",
            "description": "Summation.",
            "format": "double",
            "nullable": true
          },
          "SumSquaredValue": {
            "type": "number",
            "description": "Squared Summation.",
            "format": "double",
            "nullable": true
          },
          "UnitId": {
            "type": "integer",
            "description": "Unit Id.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.Variable": {
        "required": [
          "Granularity",
          "GranularityTimeBase",
          "Name",
          "QuantityType",
          "UnitId"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Variable Id.",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Variable name."
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "VariableTypeId": {
            "type": "integer",
            "description": "Variable type Id.",
            "format": "int32"
          },
          "IsDefault": {
            "type": "boolean",
            "description": "If this variable is the default variable of the source."
          },
          "UnitId": {
            "type": "integer",
            "description": "Variable unit Id.",
            "format": "int32"
          },
          "Granularity": {
            "type": "number",
            "description": "Variable granularity (Cannot be set to 0).",
            "format": "double"
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "QuantityType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Models.QuantityType"
          },
          "MappingConfig": {
            "type": "string",
            "description": "Variable mapping config.",
            "nullable": true
          },
          "Aggregate": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "Tags": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tags.",
            "nullable": true
          },
          "Group": {
            "type": "string",
            "description": "Variable group",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Models.VerboseVariable": {
        "required": [
          "Granularity",
          "GranularityTimeBase",
          "Name",
          "QuantityType",
          "UnitId"
        ],
        "type": "object",
        "properties": {
          "Calculated": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.CalculatedVariables.CalculatedVariable"
          },
          "DataLossVariable": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Models.DataLossVariable"
          },
          "MustForward": {
            "type": "boolean"
          },
          "IsVersioned": {
            "type": "boolean"
          },
          "Id": {
            "type": "integer",
            "description": "Variable Id.",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Variable name."
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id.",
            "format": "int32"
          },
          "VariableTypeId": {
            "type": "integer",
            "description": "Variable type Id.",
            "format": "int32"
          },
          "IsDefault": {
            "type": "boolean",
            "description": "If this variable is the default variable of the source."
          },
          "UnitId": {
            "type": "integer",
            "description": "Variable unit Id.",
            "format": "int32"
          },
          "Granularity": {
            "type": "number",
            "description": "Variable granularity (Cannot be set to 0).",
            "format": "double"
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "QuantityType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Models.QuantityType"
          },
          "MappingConfig": {
            "type": "string",
            "description": "Variable mapping config.",
            "nullable": true
          },
          "Aggregate": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "Tags": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of tags.",
            "nullable": true
          },
          "Group": {
            "type": "string",
            "description": "Variable group",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Organizations.OrganizationDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "CreatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "CreatedBy": {
            "type": "string",
            "nullable": true
          },
          "UpdatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "UpdatedBy": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.SharedWithinTheAccountDto": {
        "type": "object",
        "properties": {
          "IsSharedWithinTheAccount": {
            "type": "boolean"
          },
          "Permission": {
            "$ref": "#/components/schemas/Opinum.Views.SharingPermission"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.SortDto": {
        "type": "object",
        "properties": {
          "Field": {
            "type": "string",
            "nullable": true
          },
          "Dir": {
            "$ref": "#/components/schemas/Opinum.Views.SortDirection"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Themes.Models.ThemeStyle": {
        "type": "object",
        "properties": {
          "Logo": {
            "type": "string",
            "nullable": true
          },
          "PrimaryColor": {
            "type": "string",
            "nullable": true
          },
          "PrimaryTextColor": {
            "type": "string",
            "nullable": true
          },
          "SecondaryColor": {
            "type": "string",
            "nullable": true
          },
          "SecondaryTextColor": {
            "type": "string",
            "nullable": true
          },
          "TertiaryTextColor": {
            "type": "string",
            "nullable": true
          },
          "Favicon": {
            "type": "string",
            "nullable": true
          },
          "LogoBackgroundColor": {
            "type": "string",
            "nullable": true
          },
          "CustomMarketingPage": {
            "type": "string",
            "nullable": true
          },
          "UseCustomMarketingPage": {
            "type": "boolean"
          },
          "LogoBackgroundTextColor": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.UserSharingDto": {
        "type": "object",
        "properties": {
          "UserId": {
            "type": "string",
            "nullable": true
          },
          "Permission": {
            "$ref": "#/components/schemas/Opinum.Views.SharingPermission"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.ClaimFilter": {
        "type": "object",
        "properties": {
          "Type": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.InvitationStatus": {
        "enum": [
          "All",
          "Used",
          "NotUsed"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Users.Models.RegisterUserResult": {
        "type": "object",
        "properties": {
          "Success": {
            "type": "boolean"
          },
          "ErrorMessage": {
            "type": "string",
            "nullable": true
          },
          "UserId": {
            "type": "string",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "ClientId": {
            "type": "string",
            "nullable": true
          },
          "language": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.Role": {
        "required": [
          "Id"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "minLength": 1,
            "type": "string",
            "description": "Role Id."
          },
          "Name": {
            "type": "string",
            "description": "Role name.",
            "nullable": true
          },
          "Count": {
            "type": "integer",
            "description": "Number of users.",
            "format": "int32"
          },
          "Selected": {
            "type": "boolean",
            "description": "If role is added."
          },
          "Edited": {
            "type": "boolean",
            "description": "If role has change."
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.RoleUser": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserInfoViewModel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserAttribute": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserBusinessKeyName": {
        "enum": [
          "Id",
          "Username",
          "Email",
          "BusinessId"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Users.Models.UserClaim": {
        "required": [
          "ClaimType",
          "ClaimValue",
          "UserId"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Claim Id (Required if update or delete).",
            "format": "int32"
          },
          "UserId": {
            "minLength": 1,
            "type": "string",
            "description": "User Id."
          },
          "ClaimType": {
            "minLength": 1,
            "type": "string",
            "description": "Claim type"
          },
          "ClaimValue": {
            "minLength": 1,
            "type": "string",
            "description": "Claim value (ex: an account Id)."
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserDisplayLevel": {
        "enum": [
          "Id",
          "Normal",
          "Verbose"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Users.Models.UserFeature": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "Feature name.",
            "nullable": true
          },
          "Label": {
            "type": "string",
            "description": "Feature label.",
            "nullable": true
          },
          "Access": {
            "type": "integer",
            "description": "Access type (NONE = 0, READ = 1, WRITE = 2, ADMIN = 3)",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserInfoLight": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "User Id.",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "description": "User email.",
            "nullable": true
          },
          "Username": {
            "type": "string",
            "description": "User name.",
            "nullable": true
          },
          "BusinessId": {
            "type": "string",
            "description": "Business ID.",
            "nullable": true
          },
          "FirstName": {
            "type": "string",
            "description": "User first name.",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "description": "User last name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserInfoViewModel": {
        "type": "object",
        "properties": {
          "Roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of roles.",
            "nullable": true
          },
          "HasNotifications": {
            "type": "boolean",
            "description": "If user has notifications."
          },
          "IsUserLocked": {
            "type": "boolean",
            "description": "If user is locked."
          },
          "Language": {
            "type": "string",
            "description": "User language.",
            "nullable": true
          },
          "Units": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "User units.",
            "nullable": true
          },
          "FirstConnectionDate": {
            "type": "string",
            "description": "First connection date of the user.",
            "format": "date-time",
            "nullable": true
          },
          "LastConnectionDate": {
            "type": "string",
            "description": "Last connection date of the user.",
            "format": "date-time",
            "nullable": true
          },
          "IsDeleted": {
            "type": "boolean",
            "description": "If user is deleted."
          },
          "DeletedBy": {
            "type": "string",
            "description": "User Id of user that delete this user.",
            "nullable": true
          },
          "DateDeleted": {
            "type": "string",
            "description": "Date of deletion.",
            "format": "date-time",
            "nullable": true
          },
          "Features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Constants.ClaimsConstants_FeatureInfo"
            },
            "description": "User features.",
            "nullable": true
          },
          "AllowAccountImpersonation": {
            "type": "boolean",
            "description": "Allow to be impersonated by account managers."
          },
          "AllowOpinumSupportImpersonation": {
            "type": "boolean",
            "description": "Allow to be impersonated by opinum support."
          },
          "Settings": {
            "description": "Additional settings. (Json dynamic object)",
            "nullable": true
          },
          "Username": {
            "type": "string",
            "description": "User name.",
            "nullable": true
          },
          "BusinessId": {
            "type": "string",
            "description": "Business ID.",
            "nullable": true
          },
          "FirstName": {
            "type": "string",
            "description": "User first name.",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "description": "User last name.",
            "nullable": true
          },
          "PhoneNumber": {
            "type": "string",
            "description": "User phone number.",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id. (Deprecated, Use property AccountIds)",
            "format": "int32",
            "nullable": true,
            "readOnly": true,
            "deprecated": true
          },
          "AccountIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Account Ids.",
            "nullable": true
          },
          "Id": {
            "type": "string",
            "description": "User Id.",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "description": "Email.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserInfoViewModelWithAccountIdBackwardCompatible": {
        "type": "object",
        "properties": {
          "AccountId": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "Roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of roles.",
            "nullable": true
          },
          "HasNotifications": {
            "type": "boolean",
            "description": "If user has notifications."
          },
          "IsUserLocked": {
            "type": "boolean",
            "description": "If user is locked."
          },
          "Language": {
            "type": "string",
            "description": "User language.",
            "nullable": true
          },
          "Units": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "User units.",
            "nullable": true
          },
          "FirstConnectionDate": {
            "type": "string",
            "description": "First connection date of the user.",
            "format": "date-time",
            "nullable": true
          },
          "LastConnectionDate": {
            "type": "string",
            "description": "Last connection date of the user.",
            "format": "date-time",
            "nullable": true
          },
          "IsDeleted": {
            "type": "boolean",
            "description": "If user is deleted."
          },
          "DeletedBy": {
            "type": "string",
            "description": "User Id of user that delete this user.",
            "nullable": true
          },
          "DateDeleted": {
            "type": "string",
            "description": "Date of deletion.",
            "format": "date-time",
            "nullable": true
          },
          "Features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Constants.ClaimsConstants_FeatureInfo"
            },
            "description": "User features.",
            "nullable": true
          },
          "AllowAccountImpersonation": {
            "type": "boolean",
            "description": "Allow to be impersonated by account managers."
          },
          "AllowOpinumSupportImpersonation": {
            "type": "boolean",
            "description": "Allow to be impersonated by opinum support."
          },
          "Settings": {
            "description": "Additional settings. (Json dynamic object)",
            "nullable": true
          },
          "Username": {
            "type": "string",
            "description": "User name.",
            "nullable": true
          },
          "BusinessId": {
            "type": "string",
            "description": "Business ID.",
            "nullable": true
          },
          "FirstName": {
            "type": "string",
            "description": "User first name.",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "description": "User last name.",
            "nullable": true
          },
          "PhoneNumber": {
            "type": "string",
            "description": "User phone number.",
            "nullable": true
          },
          "AccountIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Account Ids.",
            "nullable": true
          },
          "Id": {
            "type": "string",
            "description": "User Id.",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "description": "Email.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserInfoViewModelWithCurrentUserAccountIdBackwardCompatible": {
        "type": "object",
        "properties": {
          "AccountId": {
            "type": "integer",
            "format": "int32"
          },
          "Roles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of roles.",
            "nullable": true
          },
          "HasNotifications": {
            "type": "boolean",
            "description": "If user has notifications."
          },
          "IsUserLocked": {
            "type": "boolean",
            "description": "If user is locked."
          },
          "Language": {
            "type": "string",
            "description": "User language.",
            "nullable": true
          },
          "Units": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            },
            "description": "User units.",
            "nullable": true
          },
          "FirstConnectionDate": {
            "type": "string",
            "description": "First connection date of the user.",
            "format": "date-time",
            "nullable": true
          },
          "LastConnectionDate": {
            "type": "string",
            "description": "Last connection date of the user.",
            "format": "date-time",
            "nullable": true
          },
          "IsDeleted": {
            "type": "boolean",
            "description": "If user is deleted."
          },
          "DeletedBy": {
            "type": "string",
            "description": "User Id of user that delete this user.",
            "nullable": true
          },
          "DateDeleted": {
            "type": "string",
            "description": "Date of deletion.",
            "format": "date-time",
            "nullable": true
          },
          "Features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Constants.ClaimsConstants_FeatureInfo"
            },
            "description": "User features.",
            "nullable": true
          },
          "AllowAccountImpersonation": {
            "type": "boolean",
            "description": "Allow to be impersonated by account managers."
          },
          "AllowOpinumSupportImpersonation": {
            "type": "boolean",
            "description": "Allow to be impersonated by opinum support."
          },
          "Settings": {
            "description": "Additional settings. (Json dynamic object)",
            "nullable": true
          },
          "Username": {
            "type": "string",
            "description": "User name.",
            "nullable": true
          },
          "BusinessId": {
            "type": "string",
            "description": "Business ID.",
            "nullable": true
          },
          "FirstName": {
            "type": "string",
            "description": "User first name.",
            "nullable": true
          },
          "LastName": {
            "type": "string",
            "description": "User last name.",
            "nullable": true
          },
          "PhoneNumber": {
            "type": "string",
            "description": "User phone number.",
            "nullable": true
          },
          "AccountIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Account Ids.",
            "nullable": true
          },
          "Id": {
            "type": "string",
            "description": "User Id.",
            "nullable": true
          },
          "Email": {
            "type": "string",
            "description": "Email.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserView": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Temporary": {
            "type": "boolean"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.SortDto"
            },
            "nullable": true
          },
          "Columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Views.Column"
            },
            "nullable": true
          },
          "Filter": {
            "$ref": "#/components/schemas/Opinum.Api.Core.FilterViewDto"
          },
          "SharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Api.Core.SharedWithinTheAccountDto"
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.UserSharingDto"
            },
            "nullable": true
          },
          "CustomFilter": {
            "type": "string",
            "nullable": true
          },
          "ViewType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Users.Models.UserViewType"
          },
          "AccountId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Users.Models.UserViewType": {
        "enum": [
          "Account",
          "AdminAccount",
          "Admin"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.ViewUsageDto": {
        "type": "object",
        "properties": {
          "ResourceId": {
            "type": "string",
            "nullable": true
          },
          "UsageType": {
            "$ref": "#/components/schemas/Opinum.Views.ViewUsageType"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.HttpWebhookAuthenticationType": {
        "enum": [
          "none",
          "basic"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.KafkaAcks": {
        "enum": [
          "None",
          "All",
          "Leader"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.KafkaProducerConfigProperties": {
        "type": "object",
        "properties": {
          "SaslMechanism": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.KafkaSaslMechanism"
          },
          "Acks": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.KafkaAcks"
          },
          "ClientId": {
            "type": "string",
            "nullable": true
          },
          "MessageMaxBytes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "MessageCopyMaxBytes": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "SocketKeepaliveEnable": {
            "type": "boolean",
            "nullable": true
          },
          "SocketNagleDisable": {
            "type": "boolean",
            "nullable": true
          },
          "AllowAutoCreateTopics": {
            "type": "boolean",
            "nullable": true
          },
          "SecurityProtocol": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.KafkaSecurityProtocol"
          },
          "SslCipherSuites": {
            "type": "string",
            "nullable": true
          },
          "SslCurvesList": {
            "type": "string",
            "nullable": true
          },
          "SslSigalgsList": {
            "type": "string",
            "nullable": true
          },
          "SslKeyLocation": {
            "type": "string",
            "nullable": true
          },
          "SslKeyPassword": {
            "type": "string",
            "nullable": true
          },
          "SslKeyPem": {
            "type": "string",
            "nullable": true
          },
          "SslCertificateLocation": {
            "type": "string",
            "nullable": true
          },
          "SslCertificatePem": {
            "type": "string",
            "nullable": true
          },
          "SslCaLocation": {
            "type": "string",
            "nullable": true
          },
          "SslCaPem": {
            "type": "string",
            "nullable": true
          },
          "SslCaCertificateStores": {
            "type": "string",
            "nullable": true
          },
          "SslCrlLocation": {
            "type": "string",
            "nullable": true
          },
          "SslKeystoreLocation": {
            "type": "string",
            "nullable": true
          },
          "SslKeystorePassword": {
            "type": "string",
            "nullable": true
          },
          "SslProviders": {
            "type": "string",
            "nullable": true
          },
          "SslEngineLocation": {
            "type": "string",
            "nullable": true
          },
          "SslEngineId": {
            "type": "string",
            "nullable": true
          },
          "EnableSslCertificateVerification": {
            "type": "boolean",
            "nullable": true
          },
          "SslEndpointIdentificationAlgorithm": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.KafkaSslEndpointIdentificationAlgorithm"
          },
          "SaslKerberosServiceName": {
            "type": "string",
            "nullable": true
          },
          "SaslKerberosPrincipal": {
            "type": "string",
            "nullable": true
          },
          "SaslKerberosKinitCmd": {
            "type": "string",
            "nullable": true
          },
          "SaslKerberosKeytab": {
            "type": "string",
            "nullable": true
          },
          "SaslKerberosMinTimeBeforeRelogin": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "SaslUsername": {
            "type": "string",
            "nullable": true
          },
          "SaslPassword": {
            "type": "string",
            "nullable": true
          },
          "SaslOauthbearerConfig": {
            "type": "string",
            "nullable": true
          },
          "EnableSaslOauthbearerUnsecureJwt": {
            "type": "boolean",
            "nullable": true
          },
          "SaslOauthbearerMethod": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.KafkaSaslOauthbearerMethod"
          },
          "SaslOauthbearerClientId": {
            "type": "string",
            "nullable": true
          },
          "SaslOauthbearerClientSecret": {
            "type": "string",
            "nullable": true
          },
          "SaslOauthbearerScope": {
            "type": "string",
            "nullable": true
          },
          "SaslOauthbearerExtensions": {
            "type": "string",
            "nullable": true
          },
          "SaslOauthbearerTokenEndpointUrl": {
            "type": "string",
            "nullable": true
          },
          "EnableIdempotence": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.KafkaSaslMechanism": {
        "enum": [
          "NoSaslMechanism",
          "Gssapi",
          "Plain",
          "ScramSha256",
          "ScramSha512",
          "OAuthBearer"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.KafkaSaslOauthbearerMethod": {
        "enum": [
          "DefaultSaslOauthbearerMethod",
          "Oidc"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.KafkaSecurityProtocol": {
        "enum": [
          "NoSecurityProtocol",
          "Plaintext",
          "Ssl",
          "SaslPlaintext",
          "SaslSsl"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.KafkaSslEndpointIdentificationAlgorithm": {
        "enum": [
          "NoSslEndpointIdentificationAlgorithm",
          "Https"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.ProtocolModels.Amqp.AmqpQueueConfig": {
        "type": "object",
        "properties": {
          "Host": {
            "type": "string",
            "nullable": true
          },
          "QueueName": {
            "type": "string",
            "nullable": true
          },
          "Port": {
            "type": "integer",
            "format": "int32"
          },
          "UserName": {
            "type": "string",
            "nullable": true
          },
          "Password": {
            "type": "string",
            "nullable": true
          },
          "UseSsl": {
            "type": "boolean"
          },
          "VirtualHost": {
            "type": "string",
            "nullable": true
          },
          "Parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.SecretParameter"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.ProtocolModels.Http.HttpWebhookAuthentication": {
        "type": "object",
        "properties": {
          "Username": {
            "type": "string",
            "description": "User name.",
            "nullable": true
          },
          "Password": {
            "type": "string",
            "description": "Password.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.ProtocolModels.Kafka.KafkaTopicConfig": {
        "type": "object",
        "properties": {
          "BootstrapServers": {
            "type": "string",
            "nullable": true
          },
          "TopicName": {
            "type": "string",
            "nullable": true
          },
          "ProducerConfigProperties": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.KafkaProducerConfigProperties"
          },
          "Parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.SecretParameter"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.ProtocolModels.Mqtt.MqttTopicConfig": {
        "type": "object",
        "properties": {
          "Url": {
            "type": "string",
            "nullable": true
          },
          "ClientId": {
            "type": "string",
            "nullable": true
          },
          "TopicName": {
            "type": "string",
            "nullable": true
          },
          "Port": {
            "type": "integer",
            "format": "int32"
          },
          "UserName": {
            "type": "string",
            "nullable": true
          },
          "Password": {
            "type": "string",
            "nullable": true
          },
          "Parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.SecretParameter"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.SecretParameter": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "nullable": true
          },
          "Secret": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.Webhook": {
        "required": [
          "Body",
          "EventType",
          "Format",
          "Name",
          "ProviderType"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Webhook Id.",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Webhook name."
          },
          "ProviderType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookProviderType"
          },
          "EventType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookEventType"
          },
          "Disabled": {
            "type": "boolean",
            "description": "True if this Webhook is disabled, otherwise false."
          },
          "FailedCount": {
            "type": "integer",
            "description": "Number of fails.",
            "format": "int32"
          },
          "Format": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookFormat"
          },
          "Body": {
            "minLength": 1,
            "type": "string",
            "description": "Content."
          },
          "AssociatedResources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Associated resources",
            "nullable": true
          },
          "HistoryRetentionPeriod": {
            "type": "string",
            "description": "History expiration period (duration in ISO 8601 format : https://en.wikipedia.org/wiki/ISO_8601#Durations)",
            "nullable": true
          },
          "Url": {
            "type": "string",
            "description": "The Url of the target API",
            "nullable": true
          },
          "AuthenticationType": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.HttpWebhookAuthenticationType"
          },
          "Authentication": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.ProtocolModels.Http.HttpWebhookAuthentication"
          },
          "Headers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookHeader"
            },
            "nullable": true
          },
          "AmqpQueueConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.ProtocolModels.Amqp.AmqpQueueConfig"
          },
          "KafkaTopicConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.ProtocolModels.Kafka.KafkaTopicConfig"
          },
          "MqttTopicConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.ProtocolModels.Mqtt.MqttTopicConfig"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.WebhookDisplayLevel": {
        "enum": [
          "Normal",
          "Light"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.WebhookEventType": {
        "enum": [
          "alert",
          "dataQuality",
          "sourceCreate",
          "sourceUpdate",
          "sourceDelete",
          "masterData",
          "alarm",
          "standardFileUploaded",
          "sourceAndVariablesCreated",
          "reportGenerationCompleted",
          "dataIngestion"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.WebhookFormat": {
        "enum": [
          "json",
          "xml"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.WebhookHeader": {
        "type": "object",
        "properties": {
          "Key": {
            "type": "string",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "nullable": true
          },
          "Secret": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.WebhookHistory": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Webhook history Id.",
            "nullable": true
          },
          "WebhookId": {
            "type": "string",
            "description": "Webhook Id.",
            "nullable": true
          },
          "ExecutionDate": {
            "type": "string",
            "description": "Execution date.",
            "format": "date-time"
          },
          "Succeeded": {
            "type": "boolean",
            "description": "If the execution succeed."
          },
          "Request": {
            "type": "string",
            "description": "The request.",
            "nullable": true
          },
          "Response": {
            "type": "string",
            "description": "The response.",
            "nullable": true
          },
          "ExpireAfter": {
            "type": "string",
            "description": "Expiration date",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Core.Webhook.WebhookProviderType": {
        "enum": [
          "http",
          "amqpV10",
          "amqpV09",
          "mqtt",
          "kafka"
        ],
        "type": "string"
      },
      "Opinum.Api.Core.Webhook.WebhookTest": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Test Id.",
            "nullable": true
          },
          "WebhookId": {
            "type": "string",
            "description": "Test Id.",
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "Patch": {
            "$ref": "#/components/schemas/Microsoft.AspNetCore.JsonPatch.JsonPatchDocument"
          },
          "Webhook": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.Webhook"
          },
          "NotificationContext": {
            "description": "JSON object that contain objects used in the webhook body",
            "nullable": true
          },
          "Result": {
            "$ref": "#/components/schemas/Opinum.Api.Core.Webhook.WebhookHistory"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AccountConfigurationDtos.ConfigurationSectionDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "JsonSchema": {
            "$ref": "#/components/schemas/System.Text.Json.JsonDocument"
          },
          "DefaultValue": {
            "$ref": "#/components/schemas/System.Text.Json.JsonDocument"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AddRemoveUsersToFromAccountBody": {
        "type": "object",
        "properties": {
          "UserIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "AccountIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmCountersDto": {
        "type": "object",
        "properties": {
          "Uncertain": {
            "type": "integer",
            "format": "int32"
          },
          "Inhibited": {
            "type": "integer",
            "format": "int32"
          },
          "NotPresentAck": {
            "type": "integer",
            "format": "int32"
          },
          "NotPresentNack": {
            "type": "integer",
            "format": "int32"
          },
          "PresentAck": {
            "type": "integer",
            "format": "int32"
          },
          "PresentNack": {
            "type": "integer",
            "format": "int32"
          },
          "HasBeenPresent": {
            "type": "boolean"
          },
          "HasBeenNotPresent": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Number of occurrences for each alarm state."
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDetailLevelDto": {
        "enum": [
          "All",
          "State"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto": {
        "required": [
          "FriendlyName",
          "SiteId",
          "SourceId",
          "VariableId"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Unique identifier of the alarm.",
            "nullable": true
          },
          "SourceId": {
            "type": "integer",
            "description": "Identifier of the source associated with the alarm.",
            "format": "int32"
          },
          "SiteId": {
            "type": "integer",
            "description": "Identifier of the site where the alarm is configured.",
            "format": "int32"
          },
          "VariableId": {
            "type": "integer",
            "description": "Identifier of the variable monitored by the alarm.",
            "format": "int32"
          },
          "FriendlyName": {
            "minLength": 1,
            "type": "string",
            "description": "User-friendly name of the alarm."
          },
          "ThresholdType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType"
          },
          "CreatedBy": {
            "type": "string",
            "description": "User who created the alarm.",
            "nullable": true
          },
          "CreatedDate": {
            "type": "string",
            "description": "Date and time when the alarm was created.",
            "format": "date-time",
            "nullable": true
          },
          "Granularity": {
            "type": "number",
            "description": "Granularity value for the alarm's data.",
            "format": "double",
            "nullable": true
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "UpdatedBy": {
            "type": "string",
            "description": "User who last updated the alarm.",
            "nullable": true
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Date and time when the alarm was last updated.",
            "format": "date-time"
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType"
          },
          "SetValue": {
            "type": "number",
            "description": "Value at which the alarm is triggered.",
            "format": "double"
          },
          "ResetValue": {
            "type": "number",
            "description": "Value at which the alarm is reset.",
            "format": "double"
          },
          "Priority": {
            "type": "integer",
            "description": "Priority level of the alarm.",
            "format": "int32"
          },
          "FrequencyType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
          },
          "AggregationType": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "ScheduleNextExecutionDate": {
            "type": "string",
            "description": "Next scheduled execution date for the alarm (ReadOnly, based on cron).",
            "format": "date-time",
            "nullable": true
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotification"
            },
            "description": "List of notifications associated with the alarm.",
            "nullable": true
          },
          "Exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmException"
            },
            "description": "List of exceptions associated with the alarm.",
            "nullable": true
          },
          "ScheduleConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmScheduleConfig"
          },
          "Cron": {
            "type": "string",
            "description": "Cron expression used to schedule (See https://crontab.guru/).",
            "nullable": true
          },
          "IsAdvancedCron": {
            "type": "boolean",
            "description": "Indicates whether the cron expression is used in advanced mode.",
            "nullable": true
          },
          "CronGap": {
            "type": "string",
            "description": "Time gap for the cron schedule (ReadOnly, based on cron).",
            "format": "date-span",
            "nullable": true
          },
          "RawDataAgeFilter": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.RawDataAgeFilter"
          },
          "LatestStateChange": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceDto"
          },
          "Enabled": {
            "type": "boolean",
            "description": "Indicates whether the alarm is enabled."
          },
          "Frozen": {
            "type": "boolean",
            "description": "Indicates whether the alarm is frozen."
          },
          "ForceInhibited": {
            "type": "boolean",
            "description": "Indicates whether the alarm is forcefully inhibited."
          },
          "AlarmTemplateId": {
            "type": "string",
            "description": "Identifier of the alarm template used (if any).",
            "nullable": true
          },
          "Counters": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmCountersDto"
          },
          "TimePeriodComparisonDefinition": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto"
          }
        },
        "additionalProperties": false,
        "description": "Data Transfer Object (DTO) representing an alarm configuration and its associated properties.\n@See https://docs.opinum.com/user-manual/alarms/alarms-overview.html for more documentation."
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmException": {
        "type": "object",
        "properties": {
          "From": {
            "type": "string",
            "description": "Exception begin date (when AlarmExceptionType is 'DateRange').",
            "format": "date-time"
          },
          "To": {
            "type": "string",
            "description": "Exception end date (when AlarmExceptionType is 'DateRange').",
            "format": "date-time"
          },
          "Reason": {
            "type": "string",
            "description": "Exception reason.",
            "nullable": true
          },
          "SiteId": {
            "type": "integer",
            "description": "Exception SiteId (when AlarmExceptionType is 'Variable')",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Exception SourceId (when AlarmExceptionType is 'Variable')",
            "format": "int32"
          },
          "VariableId": {
            "type": "integer",
            "description": "Exception VariableId (when AlarmExceptionType is 'Variable')",
            "format": "int32"
          },
          "Operator": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.VariableAlarmExceptionOperator"
          },
          "Value": {
            "type": "number",
            "description": "Exception Variable value (when AlarmExceptionType is 'Variable')",
            "format": "double"
          },
          "AlarmExceptionType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmExceptionType"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmExceptionType": {
        "enum": [
          "DateRange",
          "Variable"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType": {
        "enum": [
          "Raw",
          "Rolling",
          "Scheduled"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotification": {
        "type": "object",
        "properties": {
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationType"
          },
          "Target": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationTarget"
          },
          "Value": {
            "type": "string",
            "description": "Alarm notifications value.",
            "nullable": true
          },
          "NotifyOnTriggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmStateTriggers"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationMetadata": {
        "type": "object",
        "properties": {
          "EmailTrackingId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationTarget": {
        "enum": [
          "User",
          "Custom"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationType": {
        "enum": [
          "Email",
          "Sms",
          "Webhook",
          "Event",
          "Variable"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Alarm history Id.",
            "nullable": true
          },
          "AlarmId": {
            "type": "string",
            "description": "Alarm Id.",
            "nullable": true
          },
          "UpdatedBy": {
            "type": "string",
            "description": "UserId, if any, who triggered this new state",
            "nullable": true
          },
          "TriggerDate": {
            "type": "string",
            "description": "Date of the datapoints that .",
            "format": "date-time"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceNotification"
            },
            "description": "Alarm history notifications.",
            "nullable": true
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceStateDto"
          },
          "Value": {
            "type": "number",
            "description": "Alarm history value.",
            "format": "double",
            "nullable": true
          },
          "Date": {
            "type": "string",
            "description": "Alarm history date.",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceNotification": {
        "type": "object",
        "properties": {
          "AlarmNotification": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotification"
          },
          "AlarmNotificationMetadata": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationMetadata"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmOccurrenceStateDto": {
        "type": "object",
        "properties": {
          "Present": {
            "type": "boolean"
          },
          "Acknowledged": {
            "type": "boolean"
          },
          "Inhibited": {
            "type": "boolean"
          },
          "Uncertain": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmPeriodDto": {
        "type": "object",
        "properties": {
          "Begin": {
            "type": "string",
            "format": "date-time"
          },
          "End": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmScheduleConfig": {
        "type": "object",
        "properties": {
          "ScheduleId": {
            "type": "integer",
            "description": "Schedule id.",
            "format": "int32",
            "nullable": true
          },
          "ScheduleLevelIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Schedule level id.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmStateTriggers": {
        "enum": [
          "Set",
          "Reset",
          "Ack",
          "Disable",
          "Enable"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType": {
        "enum": [
          "Low",
          "High"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType": {
        "enum": [
          "Threshold",
          "Binary",
          "PastPeriodCompare"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.DataPointsAggregationPeriodDefinitionDto": {
        "type": "object",
        "properties": {
          "Aggregation": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.DataPointsAggregationPeriodDefinitionDto_AggregationFunction"
          },
          "AggregationPeriodStart": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.NegativeRelativePeriodDto"
          },
          "AggregationPeriod": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.PositiveRelativePeriodDto"
          }
        },
        "additionalProperties": false,
        "description": "Definition of a data points aggregation over a defined period for reference or comparison purposes"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.DataPointsAggregationPeriodDefinitionDto_AggregationFunction": {
        "enum": [
          "Average",
          "Minimum",
          "Maximum",
          "Sum",
          "Count"
        ],
        "type": "string",
        "description": "aggregation function to apply to data points in the defined period"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.GetDatesAndAggregationPeriodsDto": {
        "type": "object",
        "properties": {
          "TimePeriodComparisonDefinition": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto"
          },
          "AlarmTriggerDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.GetDatesAndAggregationPeriodsResponseDto": {
        "type": "object",
        "properties": {
          "AlarmTriggerDate": {
            "type": "string",
            "format": "date-time"
          },
          "ReferencePeriodStart": {
            "type": "string",
            "format": "date-time"
          },
          "ComparePeriodStart": {
            "type": "string",
            "format": "date-time"
          },
          "ReferencePeriods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmPeriodDto"
            },
            "nullable": true
          },
          "ComparePeriods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmPeriodDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.NegativeRelativePeriodDto": {
        "type": "object",
        "properties": {
          "NumberOfPeriods": {
            "type": "integer",
            "description": "Number of periods to consider.",
            "format": "int32"
          },
          "PeriodType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.PeriodTypeEnum"
          }
        },
        "additionalProperties": false,
        "description": "DTO representing a negative relative time period for alarms."
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.PeriodCompareOperator": {
        "enum": [
          "LowerThan",
          "LowerThanOrEqual",
          "GreaterThan",
          "GreaterThanOrEqual",
          "Equal",
          "NotEqual"
        ],
        "type": "string",
        "description": "Remark: Approximately equal and not equal operators are based on a predefined delta value."
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.PeriodTypeEnum": {
        "enum": [
          "Day",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday",
          "Sunday",
          "SingleDay",
          "Week",
          "Month",
          "Quarter",
          "Year",
          "WeekNumber",
          "MonthNumber",
          "QuarterNumber",
          "MultiDay"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.PositiveRelativePeriodDto": {
        "type": "object",
        "properties": {
          "TimeBoxedPeriod": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimeBoxedPeriodDto"
          },
          "NumberOfPeriods": {
            "type": "integer",
            "description": "Number of periods to consider.",
            "format": "int32"
          },
          "PeriodType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.PeriodTypeEnum"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.ResetAlarmRequestDto": {
        "type": "object",
        "properties": {
          "AlarmIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "ClearHistory": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.TimeBoxedPeriodDto": {
        "type": "object",
        "properties": {
          "FromTimeStampIso8601": {
            "type": "string",
            "description": "The starting timestamp of the period in ISO 8601 format.",
            "nullable": true
          },
          "ToTimeStampIso8601": {
            "type": "string",
            "description": "The ending timestamp of the period in ISO 8601 format.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto": {
        "type": "object",
        "properties": {
          "ReferencePeriod": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.DataPointsAggregationPeriodDefinitionDto"
          },
          "ComparePeriod": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.DataPointsAggregationPeriodDefinitionDto"
          },
          "OverridenComparePeriodVariableId": {
            "type": "integer",
            "description": "Optional, by default, the variable used for the reference period is the\nsame as the one used for the comparison period.\nIf set, this variable id will be used for the comparison period instead.",
            "format": "int32"
          },
          "ComparisonOperator": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.PeriodCompareOperator"
          },
          "DeltaType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto_DeltaTypeEnum"
          },
          "AllowedDelta": {
            "type": "number",
            "description": "Allowed difference between the reference and comparison periods before\ntriggering the alarm.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Definition of a reference period and a comparison period for configuring comparison alarms"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto_DeltaTypeEnum": {
        "enum": [
          "Absolute",
          "Percentage"
        ],
        "type": "string",
        "description": "Type of delta to use for comparison (absolute or percentage)"
      },
      "Opinum.Api.Server.Controllers.AlarmControllerDtos.VariableAlarmExceptionOperator": {
        "enum": [
          "Equal",
          "GreaterThan",
          "LowerThan"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDataSourceDto": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Datasource Name"
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDataSourceType"
          },
          "SiteId": {
            "type": "integer",
            "description": "Datasource SiteId (when Type is 'Variable')",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Datasource SourceId (when Type is 'Variable')",
            "format": "int32"
          },
          "VariableId": {
            "type": "integer",
            "description": "Datasource VariableId (when Type is 'Variable')",
            "format": "int32"
          },
          "ViewId": {
            "type": "string",
            "description": "Datasource ViewId (when Type is 'SavedView')",
            "nullable": true
          },
          "VariableName": {
            "type": "string",
            "description": "Datasource Variable name (when Type is 'SavedView')",
            "nullable": true
          },
          "SelectionMode": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateViewDataSourceSelectionMode"
          },
          "SelectedNumbers": {
            "type": "integer",
            "description": "Datasource variable top selected number (when Type is 'SavedView')",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDataSourceType": {
        "enum": [
          "Variable",
          "SavedView"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDto": {
        "required": [
          "AlarmTemplateInstancesBusinessKey",
          "Datasources"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Alarm Id.",
            "nullable": true
          },
          "FriendlyName": {
            "type": "string",
            "description": "Alarm name.",
            "nullable": true
          },
          "ThresholdType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType"
          },
          "CreatedBy": {
            "type": "string",
            "description": "Alarm creation user.",
            "nullable": true
          },
          "CreatedDate": {
            "type": "string",
            "description": "Alarm creation date.",
            "format": "date-time"
          },
          "Granularity": {
            "type": "number",
            "description": "Granularity value.",
            "format": "double",
            "nullable": true
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Alarm last update user.",
            "nullable": true
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Alarm last update date.",
            "format": "date-time"
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType"
          },
          "SetValue": {
            "type": "number",
            "description": "Alarm set value.",
            "format": "double"
          },
          "ResetValue": {
            "type": "number",
            "description": "Alarm reset value.",
            "format": "double"
          },
          "Priority": {
            "type": "integer",
            "description": "Alarm low value.",
            "format": "int32"
          },
          "FrequencyType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
          },
          "AggregationType": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateNotification"
            },
            "description": "Alarm notifications.",
            "nullable": true
          },
          "Exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateException"
            },
            "description": "Alarm exceptions.",
            "nullable": true
          },
          "ScheduleConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmScheduleConfig"
          },
          "Cron": {
            "type": "string",
            "description": "Cron expression used to schedule (See https://crontab.guru/).",
            "nullable": true
          },
          "IsAdvancedCron": {
            "type": "boolean",
            "description": "If cron is used in advanced mode.",
            "nullable": true
          },
          "RawDataAgeFilter": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.RawDataAgeFilter"
          },
          "Enabled": {
            "type": "boolean",
            "description": "True if the alarm template instances where enabled upon creation"
          },
          "Datasources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDataSourceDto"
            },
            "description": "A list of data sources identifying the sources/variables for which an alarm must exist"
          },
          "AlarmTemplateInstancesBusinessKey": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesBusinessKeyDto"
          },
          "AlarmTemplateInstancesName": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesNameDto"
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousStateDto"
          },
          "Success": {
            "type": "boolean",
            "description": "True if the call succeeded, otherwise false"
          },
          "Errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of errors if Success == false",
            "nullable": true
          },
          "TimePeriodComparisonDefinition": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateException": {
        "type": "object",
        "properties": {
          "ExcludeSourceIds": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of source Ids to exclude from the exception",
            "nullable": true
          },
          "RestrictToSourceIds": {
            "uniqueItems": true,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of source Ids to which exception applies",
            "nullable": true
          },
          "From": {
            "type": "string",
            "description": "Exception begin date (when AlarmExceptionType = 0).",
            "format": "date-time"
          },
          "To": {
            "type": "string",
            "description": "Exception end date (when AlarmExceptionType = 0).",
            "format": "date-time"
          },
          "Reason": {
            "type": "string",
            "description": "Exception reason.",
            "nullable": true
          },
          "VariableName": {
            "type": "string",
            "description": "Exception VariableName (when AlarmExceptionType = 1)",
            "nullable": true
          },
          "VariableMappingConfig": {
            "type": "string",
            "description": "Exception VariableMappingConfig (when AlarmExceptionType = 1)",
            "nullable": true
          },
          "Operator": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.VariableAlarmExceptionOperator"
          },
          "Value": {
            "type": "number",
            "description": "Exception Variable value (when AlarmExceptionType = 1)",
            "format": "double"
          },
          "AlarmExceptionType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmExceptionType"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstanceBusinessKeyProperty": {
        "enum": [
          "None",
          "SiteName",
          "SiteId",
          "SourceName",
          "SourceId",
          "VariableName",
          "VariableId",
          "VariableMappingConfig",
          "TemplateBusinessKey",
          "CurrentDate",
          "TemplateName"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstanceNameProperty": {
        "enum": [
          "None",
          "SiteName",
          "SiteId",
          "SourceName",
          "SourceId",
          "VariableName",
          "VariableId",
          "VariableMappingConfig",
          "TemplateBusinessKey",
          "CurrentDate",
          "TemplateName"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesBusinessKeyDto": {
        "type": "object",
        "properties": {
          "Properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstanceBusinessKeyProperty"
            },
            "description": "The ordered list of properties that are used in the pattern. Placeholder {0} in the pattern refers to Properties[0], and so on.\n'TemplateBusinessKey' is mandatory to ensure alarm instance key uniqueness",
            "nullable": true
          },
          "Pattern": {
            "type": "string",
            "description": "A pattern that contains free text and place holders that will be substituted by the corresponding value of the property at the place holder index.\nEach alarm instance key will be set the rendered pattern.  \nE.g:\nProperties = [\"TemplateBusinessKey\", \"SourceName\", \"VariableId\"]\nPattern = \"Alarm '{0}' set on variable {2} of source '{1}'\"\nRendered pattern: \"Alarm 'my_alarm' set on variable 123 of source 'the_name_of_the_source'\"",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesNameDto": {
        "type": "object",
        "properties": {
          "Properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstanceNameProperty"
            },
            "description": "The ordered list of properties that are used in the pattern. Placeholder {0} in the pattern refers to Properties[0].",
            "nullable": true
          },
          "Pattern": {
            "type": "string",
            "description": "A pattern that contains free text and place holders that will be substituted by the corresponding value of the property at the place holder index.\nEach alarm instance friendlyName will be set the rendered pattern.  \nE.g:\nProperties = [\"TemplateBusinessKey\", \"SourceName\", \"VariableId\"]\nPattern = \"Alarm '{0}' set on variable {2} of source '{1}'\"\nRendered pattern: \"Alarm 'my_alarm' set on variable 123 of source 'the_name_of_the_source'\"",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateNotification": {
        "type": "object",
        "properties": {
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationType"
          },
          "Target": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmNotificationTarget"
          },
          "Value": {
            "type": "string",
            "description": "Alarm notifications value.",
            "nullable": true
          },
          "VariableName": {
            "type": "string",
            "description": "Alarm notifications variable name (when type == 5).",
            "nullable": true
          },
          "VariableMappingConfig": {
            "type": "string",
            "description": "Alarm notifications variable mappingConfig (when type == 5).",
            "nullable": true
          },
          "NotifyOnTriggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmStateTriggers"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateViewDataSourceSelectionMode": {
        "enum": [
          "All",
          "Top"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateWithInstancesDto": {
        "required": [
          "AlarmTemplateInstancesBusinessKey",
          "Datasources"
        ],
        "type": "object",
        "properties": {
          "Instances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
            },
            "nullable": true
          },
          "Id": {
            "type": "string",
            "description": "Alarm Id.",
            "nullable": true
          },
          "FriendlyName": {
            "type": "string",
            "description": "Alarm name.",
            "nullable": true
          },
          "ThresholdType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType"
          },
          "CreatedBy": {
            "type": "string",
            "description": "Alarm creation user.",
            "nullable": true
          },
          "CreatedDate": {
            "type": "string",
            "description": "Alarm creation date.",
            "format": "date-time"
          },
          "Granularity": {
            "type": "number",
            "description": "Granularity value.",
            "format": "double",
            "nullable": true
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Alarm last update user.",
            "nullable": true
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Alarm last update date.",
            "format": "date-time"
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType"
          },
          "SetValue": {
            "type": "number",
            "description": "Alarm set value.",
            "format": "double"
          },
          "ResetValue": {
            "type": "number",
            "description": "Alarm reset value.",
            "format": "double"
          },
          "Priority": {
            "type": "integer",
            "description": "Alarm low value.",
            "format": "int32"
          },
          "FrequencyType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
          },
          "AggregationType": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateNotification"
            },
            "description": "Alarm notifications.",
            "nullable": true
          },
          "Exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateException"
            },
            "description": "Alarm exceptions.",
            "nullable": true
          },
          "ScheduleConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmScheduleConfig"
          },
          "Cron": {
            "type": "string",
            "description": "Cron expression used to schedule (See https://crontab.guru/).",
            "nullable": true
          },
          "IsAdvancedCron": {
            "type": "boolean",
            "description": "If cron is used in advanced mode.",
            "nullable": true
          },
          "RawDataAgeFilter": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.RawDataAgeFilter"
          },
          "Enabled": {
            "type": "boolean",
            "description": "True if the alarm template instances where enabled upon creation"
          },
          "Datasources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDataSourceDto"
            },
            "description": "A list of data sources identifying the sources/variables for which an alarm must exist"
          },
          "AlarmTemplateInstancesBusinessKey": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesBusinessKeyDto"
          },
          "AlarmTemplateInstancesName": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesNameDto"
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousStateDto"
          },
          "Success": {
            "type": "boolean",
            "description": "True if the call succeeded, otherwise false"
          },
          "Errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of errors if Success == false",
            "nullable": true
          },
          "TimePeriodComparisonDefinition": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmViewDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Temporary": {
            "type": "boolean"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "Sort": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.SortDto"
            },
            "nullable": true
          },
          "Columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Views.Column"
            },
            "nullable": true
          },
          "Filter": {
            "$ref": "#/components/schemas/Opinum.Api.Core.FilterViewDto"
          },
          "Usages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.ViewUsageDto"
            },
            "nullable": true
          },
          "SharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Api.Core.SharedWithinTheAccountDto"
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Core.UserSharingDto"
            },
            "nullable": true
          },
          "SiteId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "IsTemplateView": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.CreatedAlarmTemplateDto": {
        "required": [
          "AlarmTemplateInstancesBusinessKey",
          "Datasources"
        ],
        "type": "object",
        "properties": {
          "CreatedAlarmsCount": {
            "type": "integer",
            "description": "The number of updated alarms instances",
            "format": "int32"
          },
          "NewAlarms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmDto"
            },
            "description": "The list of new alarm instances that were created",
            "nullable": true
          },
          "Id": {
            "type": "string",
            "description": "Alarm Id.",
            "nullable": true
          },
          "FriendlyName": {
            "type": "string",
            "description": "Alarm name.",
            "nullable": true
          },
          "ThresholdType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType"
          },
          "CreatedBy": {
            "type": "string",
            "description": "Alarm creation user.",
            "nullable": true
          },
          "CreatedDate": {
            "type": "string",
            "description": "Alarm creation date.",
            "format": "date-time"
          },
          "Granularity": {
            "type": "number",
            "description": "Granularity value.",
            "format": "double",
            "nullable": true
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Alarm last update user.",
            "nullable": true
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Alarm last update date.",
            "format": "date-time"
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType"
          },
          "SetValue": {
            "type": "number",
            "description": "Alarm set value.",
            "format": "double"
          },
          "ResetValue": {
            "type": "number",
            "description": "Alarm reset value.",
            "format": "double"
          },
          "Priority": {
            "type": "integer",
            "description": "Alarm low value.",
            "format": "int32"
          },
          "FrequencyType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
          },
          "AggregationType": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateNotification"
            },
            "description": "Alarm notifications.",
            "nullable": true
          },
          "Exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateException"
            },
            "description": "Alarm exceptions.",
            "nullable": true
          },
          "ScheduleConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmScheduleConfig"
          },
          "Cron": {
            "type": "string",
            "description": "Cron expression used to schedule (See https://crontab.guru/).",
            "nullable": true
          },
          "IsAdvancedCron": {
            "type": "boolean",
            "description": "If cron is used in advanced mode.",
            "nullable": true
          },
          "RawDataAgeFilter": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.RawDataAgeFilter"
          },
          "Enabled": {
            "type": "boolean",
            "description": "True if the alarm template instances where enabled upon creation"
          },
          "Datasources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDataSourceDto"
            },
            "description": "A list of data sources identifying the sources/variables for which an alarm must exist"
          },
          "AlarmTemplateInstancesBusinessKey": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesBusinessKeyDto"
          },
          "AlarmTemplateInstancesName": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesNameDto"
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousStateDto"
          },
          "Success": {
            "type": "boolean",
            "description": "True if the call succeeded, otherwise false"
          },
          "Errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of errors if Success == false",
            "nullable": true
          },
          "TimePeriodComparisonDefinition": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.DeletedAlarmTemplateDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "The Id of the deleted alarm template",
            "nullable": true
          },
          "DeletedAlarmsCount": {
            "type": "integer",
            "description": "The number of delete alarm instances",
            "format": "int32"
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousStateDto"
          },
          "Success": {
            "type": "boolean",
            "description": "True if the call succeeded, otherwise false"
          },
          "Errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of errors if Success == false",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.SortingDirection": {
        "enum": [
          "Asc",
          "Desc"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.UpdatedAlarmTemplateDto": {
        "required": [
          "AlarmTemplateInstancesBusinessKey",
          "Datasources"
        ],
        "type": "object",
        "properties": {
          "UpdatedAlarmsCount": {
            "type": "integer",
            "description": "The number of updated alarms instances",
            "format": "int32"
          },
          "Id": {
            "type": "string",
            "description": "Alarm Id.",
            "nullable": true
          },
          "FriendlyName": {
            "type": "string",
            "description": "Alarm name.",
            "nullable": true
          },
          "ThresholdType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmThresholdType"
          },
          "CreatedBy": {
            "type": "string",
            "description": "Alarm creation user.",
            "nullable": true
          },
          "CreatedDate": {
            "type": "string",
            "description": "Alarm creation date.",
            "format": "date-time"
          },
          "Granularity": {
            "type": "number",
            "description": "Granularity value.",
            "format": "double",
            "nullable": true
          },
          "GranularityTimeBase": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.DataQuality.TimePeriod"
          },
          "UpdatedBy": {
            "type": "string",
            "description": "Alarm last update user.",
            "nullable": true
          },
          "UpdatedDate": {
            "type": "string",
            "description": "Alarm last update date.",
            "format": "date-time"
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmType"
          },
          "SetValue": {
            "type": "number",
            "description": "Alarm set value.",
            "format": "double"
          },
          "ResetValue": {
            "type": "number",
            "description": "Alarm reset value.",
            "format": "double"
          },
          "Priority": {
            "type": "integer",
            "description": "Alarm low value.",
            "format": "int32"
          },
          "FrequencyType": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmFrequencyType"
          },
          "AggregationType": {
            "$ref": "#/components/schemas/Opinum.Variables.Models.Aggregate"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateNotification"
            },
            "description": "Alarm notifications.",
            "nullable": true
          },
          "Exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateException"
            },
            "description": "Alarm exceptions.",
            "nullable": true
          },
          "ScheduleConfig": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.AlarmScheduleConfig"
          },
          "Cron": {
            "type": "string",
            "description": "Cron expression used to schedule (See https://crontab.guru/).",
            "nullable": true
          },
          "IsAdvancedCron": {
            "type": "boolean",
            "description": "If cron is used in advanced mode.",
            "nullable": true
          },
          "RawDataAgeFilter": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Alert.RawDataAgeFilter"
          },
          "Enabled": {
            "type": "boolean",
            "description": "True if the alarm template instances where enabled upon creation"
          },
          "Datasources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateDataSourceDto"
            },
            "description": "A list of data sources identifying the sources/variables for which an alarm must exist"
          },
          "AlarmTemplateInstancesBusinessKey": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesBusinessKeyDto"
          },
          "AlarmTemplateInstancesName": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmTemplateControllerDtos.AlarmTemplateInstancesNameDto"
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousStateDto"
          },
          "Success": {
            "type": "boolean",
            "description": "True if the call succeeded, otherwise false"
          },
          "Errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The list of errors if Success == false",
            "nullable": true
          },
          "TimePeriodComparisonDefinition": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AlarmControllerDtos.TimePeriodComparisonDefinitionDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AsynchronousOperationStateDto": {
        "type": "object",
        "properties": {
          "Operation": {
            "type": "string",
            "description": "The operation that the state refers to",
            "nullable": true
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousStateDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.AsynchronousState": {
        "enum": [
          "NotExisting",
          "Submitted",
          "Pending",
          "Completed",
          "Error"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.AsynchronousStateDto": {
        "type": "object",
        "properties": {
          "StateCode": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.AsynchronousState"
          },
          "StateDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.BaseAccountDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Account name.",
            "nullable": true
          },
          "AccountImpersonationStatus": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.ImpersonationStatus"
          },
          "OpinumSupportImpersonationStatus": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.ImpersonationStatus"
          },
          "CustomProductName": {
            "type": "string",
            "description": "Custom product name",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Accounts.V1.AccountType"
          },
          "EndOfTrial": {
            "type": "string",
            "description": "End of account trial.",
            "format": "date-time"
          },
          "ReportsConfiguration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.ReportsConfig"
          },
          "Settings": {
            "description": "JSON formatted additional settings",
            "nullable": true
          },
          "Language": {
            "type": "string",
            "description": "Account language",
            "nullable": true
          },
          "Timezone": {
            "type": "string",
            "description": "Account timezone (Windows time zone ID, e.g. \"Romance Standard Time\").",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.CreateOrganizationBody": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataAnalytics": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Publisher": {
            "type": "string",
            "nullable": true
          },
          "TileLogo": {
            "type": "string",
            "nullable": true
          },
          "TabLogo": {
            "type": "string",
            "nullable": true
          },
          "DescriptionLogo": {
            "type": "string",
            "nullable": true
          },
          "Description": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.DataAnalytics.V1.StringContent"
            },
            "nullable": true
          },
          "Tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "Location": {
            "type": "string",
            "nullable": true
          },
          "DefaultCron": {
            "type": "string",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsType"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataAnalyticsInstance": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "nullable": true
          },
          "DataAnalyticsProperties": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          },
          "DraftDataAnalyticsProperties": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          },
          "AccountId": {
            "type": "integer",
            "format": "int32"
          },
          "AssetType": {
            "type": "string",
            "nullable": true
          },
          "AssetId": {
            "type": "string",
            "nullable": true
          },
          "DataAnalyticsId": {
            "type": "string",
            "nullable": true
          },
          "State": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataAnalyticsInstanceState"
          },
          "Cron": {
            "type": "string",
            "nullable": true
          },
          "Alias": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataAnalyticsInstanceState": {
        "enum": [
          "Draft",
          "Ready",
          "Updated",
          "Disabled"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.DataAnalyticsPropertiesType": {
        "enum": [
          "Main",
          "Draft"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.DataAnalyticsType": {
        "enum": [
          "Documentation",
          "Pull",
          "Push"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.DataControllerDtos.Aggregate": {
        "enum": [
          "NONE",
          "SUM",
          "MIN",
          "MAX",
          "AVG",
          "COUNT",
          "VAR",
          "STDEV"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.DataControllerDtos.Granularity": {
        "enum": [
          "Raw",
          "Minute",
          "Hour",
          "Day",
          "Month",
          "Year",
          "All",
          "Week"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.DataControllerDtos.QueryResult": {
        "type": "object",
        "properties": {
          "InputRowsCount": {
            "type": "integer",
            "description": "The number of rows fetched by the initial data filter which are used to feed the internal SQL repository prior to apply the SQL query",
            "format": "int32"
          },
          "OutputRowsCount": {
            "type": "integer",
            "description": "The number of output rows resulting from the query",
            "format": "int32"
          },
          "InputRowsFetchDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "QueryDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "Rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataControllerDtos.QueryResult_Row"
            },
            "description": "THe rows of the output result set",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Query result"
      },
      "Opinum.Api.Server.Controllers.DataControllerDtos.QueryResult_Row": {
        "type": "object",
        "properties": {
          "Fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DataControllerDtos.QueryResult_RowField"
            },
            "description": "The list of row's fields",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single row of the result set"
      },
      "Opinum.Api.Server.Controllers.DataControllerDtos.QueryResult_RowField": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "The field's name",
            "nullable": true
          },
          "Value": {
            "description": "The field's value",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A row field"
      },
      "Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.CreateDataLossDetectionResponseDto": {
        "type": "object",
        "properties": {
          "AlreadyExists": {
            "type": "boolean",
            "description": "True if a data loss detection variable already exists for this variable, otherwise false"
          },
          "DataLossDetectionVariableId": {
            "type": "integer",
            "description": "The Id of the existing data loss detection variable if it already exist or the Id of the new data loss detection variable",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDefinitionDto": {
        "type": "object",
        "properties": {
          "OriginalVariableId": {
            "type": "integer",
            "description": "The Id of the variable subject to the data loss detection",
            "format": "int32"
          },
          "DataLossDetectionVariableId": {
            "type": "integer",
            "description": "The Id of the variable representing data loss occurrences on the original variable",
            "format": "int32"
          },
          "MissingSignalFactor": {
            "type": "integer",
            "description": "The number of periods without any data point on this variable that we can accept before signalling a data loss.\nThe period length is dynamically computed (sliding average) every time a data point is stored in the variable.",
            "format": "int32"
          },
          "AbnormalSignalFactor": {
            "type": "integer",
            "description": "The number of periods without any data point on this variable after which the variable will be flagged as \"permanently disconnected\"\nWhen this occurs, all data maintained to compute the period length are cleared, the sliding average being re-computed from scratch when data points will come back.",
            "format": "int32"
          },
          "Active": {
            "type": "boolean",
            "description": "True if the data loss detection is active, otherwise false"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionDto": {
        "type": "object",
        "properties": {
          "MissingSignalFactor": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The number of periods without any data point on this variable that we can accept before signalling a data loss.\nThe period length is dynamically computed (sliding average) every time a data point is stored in the variable.",
            "format": "int32"
          },
          "AbnormalPeriodFactor": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The number of periods without any data point on this variable after which the variable will be flagged as \"permanently disconnected\"\nWhen this occurs, all data maintained to compute the period length are cleared, the sliding average being re-computed from scratch when data points will come back.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "An optional name for this variable. If not provided, DataHub will set it to a string that mentions the original variable Id and Name.",
            "nullable": true
          },
          "MappingConfig": {
            "type": "string",
            "description": "An optional mapping config for this variable. If not provided, DataHub will set it to a string that mentions the original variable Id, the abnormal period factor and the missing period factor.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.DataLossDetectionStateChangeResponseDto": {
        "type": "object",
        "properties": {
          "WasActive": {
            "type": "boolean",
            "description": "True if a data loss detection variable was active prior the call, otherwise false"
          },
          "IsActive": {
            "type": "boolean",
            "description": "True if a data loss detection variable is currently active, otherwise false"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.UpdateDataLossDetectionDto": {
        "type": "object",
        "properties": {
          "MissingSignalFactor": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The number of periods without any data point on this variable that we can accept before signalling a data loss.\nThe period length is dynamically computed (sliding average) every time a data point is stored in the variable.",
            "format": "int32"
          },
          "AbnormalPeriodFactor": {
            "maximum": 2147483647,
            "minimum": 1,
            "type": "integer",
            "description": "The number of periods without any data point on this variable after which the variable will be flagged as \"permanently disconnected\"\nWhen this occurs, all data maintained to compute the period length are cleared, the sliding average being re-computed from scratch when data points will come back.",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DataLossDetectionControllerDtos.VariableDataLoss": {
        "type": "object",
        "properties": {
          "VariableId": {
            "type": "integer",
            "description": "The Id of the variable subject to the data loss detection",
            "format": "int32"
          },
          "LastDataPointDate": {
            "type": "string",
            "description": "The date of the last data point",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DeleteDataPointsRequest": {
        "required": [
          "VariableIds"
        ],
        "type": "object",
        "properties": {
          "VariableIds": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of variable identifiers."
          },
          "FromDateUtc": {
            "type": "string",
            "description": "The start date with offset",
            "format": "date-time",
            "nullable": true
          },
          "ToDateUtc": {
            "type": "string",
            "description": "The end date with offset",
            "format": "date-time",
            "nullable": true
          },
          "WhatIf": {
            "type": "boolean",
            "description": "If true, the response will contain what WOULD be deleted if it was processed"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DeleteDataPointsResponse": {
        "type": "object",
        "properties": {
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.DeleteDataPointsVariableResult"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.DeleteDataPointsVariableResult": {
        "type": "object",
        "properties": {
          "VariableId": {
            "type": "integer",
            "format": "int32"
          },
          "DatapointCount": {
            "type": "integer",
            "format": "int64"
          },
          "MinDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "MaxDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "IsSuccessful": {
            "type": "boolean"
          },
          "Errors": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.ExtensionModel": {
        "type": "object",
        "properties": {
          "Extension": {
            "type": "string",
            "description": "The file extension.",
            "nullable": true
          },
          "MimeType": {
            "type": "string",
            "description": "MIME Type",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.ExternalLoginType": {
        "enum": [
          "OpenIdConnect",
          "Basic",
          "ConnectionString",
          "Ftp",
          "OAuth2ResourceOwner"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.ExternalServiceProvider": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "External provider name.",
            "nullable": true
          },
          "Id": {
            "type": "string",
            "description": "External provider Id.",
            "nullable": true,
            "readOnly": true
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.ExternalLoginType"
          },
          "Key": {
            "type": "string",
            "description": "External provider key.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.ImpersonationStatus": {
        "enum": [
          "Disabled",
          "Enabled",
          "EnabledWithUserConsent"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.ReportsConfig": {
        "type": "object",
        "properties": {
          "Language": {
            "type": "string",
            "description": "Reports language.",
            "nullable": true
          },
          "DefaultTemplate": {
            "type": "string",
            "description": "Default reports notification template.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.SiteAccessModel": {
        "type": "object",
        "properties": {
          "SiteId": {
            "type": "integer",
            "format": "int32"
          },
          "AddAllSources": {
            "type": "boolean",
            "nullable": true
          },
          "SourceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.SourceControllerDtos.AddSliceRequest": {
        "type": "object",
        "properties": {
          "EffectiveDate": {
            "type": "string",
            "description": "The effective date of the slice.\nMust be greater than or equal to the effectiveDate of all existing slices.",
            "format": "date-time"
          },
          "Value": {
            "description": "The value of the slice. Can be any JSON-compatible type (string, number, bool, null).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.StorageItem": {
        "type": "object",
        "properties": {
          "SiteId": {
            "type": "integer",
            "description": "Site Id.",
            "format": "int32",
            "nullable": true
          },
          "UploadedDate": {
            "type": "string",
            "description": "Upload Date.",
            "format": "date-time"
          },
          "StorageItemTypeId": {
            "type": "integer",
            "description": "File type Id.",
            "format": "int32"
          },
          "StorageItemTypeName": {
            "type": "string",
            "description": "File type name.",
            "nullable": true
          },
          "Tag": {
            "$ref": "#/components/schemas/EnergyImpact.Shared.Core.Models.StorageItemTag"
          },
          "OwnerId": {
            "type": "string",
            "nullable": true
          },
          "ThumbnailUri": {
            "type": "string",
            "description": "Thumbnail uri (if image).",
            "nullable": true
          },
          "StorageName": {
            "type": "string",
            "description": "File name in storage.",
            "nullable": true
          },
          "FileName": {
            "type": "string",
            "description": "File name.",
            "nullable": true
          },
          "UploadFromId": {
            "$ref": "#/components/schemas/Opinum.Storage.UploadFromIdCst"
          },
          "Id": {
            "type": "integer",
            "description": "Item Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Item name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.StorageItemLight": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Item Id.",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "description": "Item name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.UpdateOrganizationBody": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration": {
        "type": "object",
        "properties": {
          "AsIso8601": {
            "type": "string",
            "description": "ISO8601 representation (PnYnMnDTnHnMnS) of the duration\nWhere:\n   P is the duration designator(referred to as \"period\"), and is always placed at the beginning of the duration.\n   Y is the year designator that follows the value for the number of years.\n   M is the month designator that follows the value for the number of months.\n   W is the week designator that follows the value for the number of weeks.\n   D is the day designator that follows the value for the number of days.\n   T is the time designator that precedes the time components.\n   H is the hour designator that follows the value for the number of hours.\n   M is the minute designator that follows the value for the number of minutes.\n   S is the second designator that follows the value for the number of seconds.",
            "nullable": true
          },
          "AsSeconds": {
            "type": "number",
            "description": "The rounded number of seconds contained in the period",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicTimeStamp": {
        "type": "object",
        "properties": {
          "AsIso8601": {
            "type": "string",
            "description": "ISO8601 representation (YYYY-MM-DDThh:mm:ss[.mmm]TZD) of the date/time\nWhere:\n  YYYY = four-digit year\n  MM = two-digit month(eg 03=March)\n  DD = two-digit day of the month(01 through 31)\n  T = a set character indicating the start of the time element\n  hh = two digits of an hour(00 through 23, AM/PM not included)\n  mm = two digits of a minute(00 through 59)\n  ss = two digits of a second(00 through 59)\n  mmm = three digits of a millisecond(000 through 999)\n  TZD = time zone designator(Z or +hh:mm or -hh:mm), the + or - values indicate how far ahead or behind a time zone is from the UTC(Coordinated Universal Time) zone.",
            "nullable": true
          },
          "AsEpoch": {
            "type": "integer",
            "description": "The number of seconds that have elapsed since 1970-01-01T00:00:00Z",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.VariableControllerDtos.RecomputeCalculatedVariableRequest": {
        "type": "object",
        "properties": {
          "FromDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.Controllers.VariableControllerDtos.VariableStatisticsAggregation": {
        "enum": [
          "None",
          "Day",
          "Month",
          "Year"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.Controllers.VariableControllerDtos.VariableStatisticsResponseDto": {
        "type": "object",
        "properties": {
          "VariableId": {
            "type": "integer",
            "description": "The Id of the variable related to the statistics",
            "format": "int32"
          },
          "StartOfRequestedPeriod": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicTimeStamp"
          },
          "EndOfRequestedPeriod": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicTimeStamp"
          },
          "ThresholdValue": {
            "type": "number",
            "description": "The threshold value.  This is a copy of the statistics request's threshold",
            "format": "double"
          },
          "TimeZoneId": {
            "type": "string",
            "description": "The time zone Id of StartOfRequestedPeriod and EndOfRequestedPeriod. It could be either the statistics request's time zone id (if specified)\nor the time zone id of the variable's source",
            "nullable": true
          },
          "SamplesCount": {
            "type": "integer",
            "description": "The number of samples (data point) found in the active period",
            "format": "int32"
          },
          "AboveThresholdSamplesCount": {
            "type": "integer",
            "description": "The number of samples in the active period that were above the threshold value (higher than of equal)",
            "format": "int32"
          },
          "BelowThresholdSamplesCount": {
            "type": "integer",
            "description": "The number of samples in the active period that were below the threshold value (lower than)",
            "format": "int32"
          },
          "RisingEdgesCount": {
            "type": "integer",
            "description": "The number of transitions between value lower than threshold and value higher than or equal to threshold.",
            "format": "int32"
          },
          "FallingEdgesCount": {
            "type": "integer",
            "description": "The number of transitions between value higher than or equal to threshold and value lower than threshold.",
            "format": "int32"
          },
          "AboveThresholdTotalDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "BelowThresholdTotalDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "AboveThresholdMinDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "BelowThresholdMinDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "AboveThresholdMaxDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "BelowThresholdMaxDuration": {
            "$ref": "#/components/schemas/Opinum.Api.Server.Controllers.VariableControllerDtos.PolymorphicDuration"
          },
          "AboveThresholdDurationRatio": {
            "type": "number",
            "description": "The ratio between AboveThresholdTotalDuration and active period, i.e. the fraction of time in the active period during which the value of the variable was higher that or equal to the threshold value.",
            "format": "double",
            "nullable": true
          },
          "BelowThresholdDurationRatio": {
            "type": "number",
            "description": "The ratio between BelowThresholdTotalDuration and active period, i.e. the fraction of time in the active period during which the value of the variable was lower than the threshold value.",
            "format": "double",
            "nullable": true
          },
          "MaxValue": {
            "type": "number",
            "description": "The maximum value among all samples/data points value",
            "format": "double",
            "nullable": true
          },
          "MinValue": {
            "type": "number",
            "description": "The minimum value among all samples/data points value",
            "format": "double",
            "nullable": true
          },
          "AverageValue": {
            "type": "number",
            "description": "The average value of all samples/data points",
            "format": "double",
            "nullable": true
          },
          "AverageAboveValue": {
            "type": "number",
            "description": "The average value of all samples/data points that were higher than of equal to the threshold value",
            "format": "double",
            "nullable": true
          },
          "AverageBelowValue": {
            "type": "number",
            "description": "The average value of all samples/data points that were lower than the threshold value",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.ControllersV1Dot7.AccountSharingPermission": {
        "enum": [
          "Read",
          "Owner"
        ],
        "type": "string"
      },
      "Opinum.Api.Server.ControllersV1Dot7.ReportDatasourceDto": {
        "required": [
          "Granularity",
          "PeriodType",
          "SheetName",
          "Type"
        ],
        "type": "object",
        "properties": {
          "SheetName": {
            "minLength": 1,
            "type": "string",
            "description": "Sheet name on report."
          },
          "Granularity": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Granularity"
          },
          "Aggregation": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Aggregate"
          },
          "SelectedMode": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.ReportSelectMode"
          },
          "SelectedNumbers": {
            "type": "integer",
            "description": "Number of source selected on the view (Required when SelectedMode=Top(1)).",
            "format": "int32",
            "nullable": true
          },
          "PeriodType": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.PeriodType"
          },
          "Period": {
            "type": "number",
            "description": "Period value (Required if Period=RelativeDate(1) or Period=LastNPoints(3)).",
            "format": "double"
          },
          "PeriodTimeBase": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.TimePeriod"
          },
          "FromAbsolutePeriod": {
            "type": "string",
            "description": "From date (Required if PeriodType=AbsoluteDate(2).",
            "format": "date-time",
            "nullable": true
          },
          "ToAbsolutePeriod": {
            "type": "string",
            "description": "To date (Required if PeriodType=AbsoluteDate(2).",
            "format": "date-time",
            "nullable": true
          },
          "UnitIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Unit Id.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.ReportDataSourceType"
          },
          "SavedViewId": {
            "type": "string",
            "description": "View Id (Required when ReportDataSourceType=SavedView(2).",
            "nullable": true
          },
          "VariableNames": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Reports.Models.Report.NamesAndGroup"
            },
            "description": "Variable name (Required if ReportDataSourceType=GivenVariable(1)).",
            "nullable": true
          },
          "SiteId": {
            "type": "integer",
            "description": "Site Id (Required if ReportDataSourceType=GivenVariable(1)).",
            "format": "int32"
          },
          "SourceId": {
            "type": "integer",
            "description": "Source Id (Required if ReportDataSourceType=GivenVariable(1)).",
            "format": "int32"
          },
          "VariableIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Variable Id (Required if ReportDataSourceType=GivenVariable(1)).",
            "nullable": true
          },
          "Groups": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "DataType": {
            "$ref": "#/components/schemas/Opinum.Reports.V1.DataSourceDataType"
          },
          "SkipUnselectedUnits": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.ControllersV1Dot7.ReportDto": {
        "required": [
          "Name"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Report ID.",
            "format": "int32"
          },
          "AccountId": {
            "type": "integer",
            "description": "Account Id.",
            "format": "int32"
          },
          "Name": {
            "minLength": 1,
            "type": "string",
            "description": "Name."
          },
          "CreatedBy": {
            "type": "string",
            "description": "Creator.",
            "nullable": true
          },
          "EditedBy": {
            "type": "string",
            "description": "Last editor.",
            "nullable": true
          },
          "CreationDate": {
            "type": "string",
            "description": "Creation date.",
            "format": "date-time"
          },
          "LastEditDate": {
            "type": "string",
            "description": "Last edition date.",
            "format": "date-time"
          },
          "NextExecutionDate": {
            "type": "string",
            "description": "Next execution date.",
            "format": "date-time",
            "nullable": true
          },
          "CronGap": {
            "type": "string",
            "description": "Cron gap.",
            "format": "date-span",
            "nullable": true
          },
          "LastErrorCode": {
            "type": "string",
            "description": "Last error code (Only if last execution fail).",
            "nullable": true
          },
          "Cron": {
            "type": "string",
            "description": "Cron expression used to schedule (See https://crontab.guru/).",
            "nullable": true
          },
          "IsAdvancedCron": {
            "type": "boolean",
            "description": "If cron is used un advanced mode."
          },
          "IsScheduled": {
            "type": "boolean",
            "description": "If this report is scheduled."
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportNotificationDto"
            },
            "description": "List of notifications.",
            "nullable": true
          },
          "Datasources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportDatasourceDto"
            },
            "description": "List of datasources.",
            "nullable": true
          },
          "MetadataDatasource": {
            "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportMetadataDatasourceDto"
          },
          "Users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.ReportUserDto"
            },
            "nullable": true
          },
          "SharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.SharedWithinTheAccountDto"
          },
          "SharingStatus": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.SharingStatus"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.ControllersV1Dot7.ReportMetadataDatasourceDto": {
        "type": "object",
        "properties": {
          "IncludeEvents": {
            "type": "boolean",
            "description": "If events are include on report."
          },
          "EventsSheetName": {
            "type": "string",
            "description": "Event sheet name (Required if IncludeEvents=true).",
            "nullable": true
          },
          "IncludeAlerts": {
            "type": "boolean",
            "description": "If alerts are include on report."
          },
          "AlertsSheetName": {
            "type": "string",
            "description": "Alert sheet name (Required if IncludeAlerts=true).",
            "nullable": true
          },
          "IncludeInvoices": {
            "type": "boolean",
            "description": "If invoices are include on report."
          },
          "InvoicesSheetName": {
            "type": "string",
            "description": "Invoice sheet name (Required if IncludeInvoices=true).",
            "nullable": true
          },
          "IncludeSites": {
            "type": "boolean",
            "description": "If sites are include on report."
          },
          "SitesSheetName": {
            "type": "string",
            "description": "Site sheet name (Required if IncludeSites=true).",
            "nullable": true
          },
          "IncludeSources": {
            "type": "boolean",
            "description": "If sources are include on report."
          },
          "SourcesSheetName": {
            "type": "string",
            "description": "Source sheet name (Required if IncludeSources=true).",
            "nullable": true
          },
          "IncludeSchedules": {
            "type": "boolean",
            "description": "If schedules are include on report."
          },
          "SchedulesSheetName": {
            "type": "string",
            "description": "Schedule sheet name (Required if IncludeSchedules=true).",
            "nullable": true
          },
          "IncludeVariables": {
            "type": "boolean",
            "description": "If variables are include on report."
          },
          "VariablesSheetName": {
            "type": "string",
            "description": "Variables sheet name (Required if IncludeVariables=true).",
            "nullable": true
          },
          "IncludeAlarms": {
            "type": "boolean",
            "description": "If alarms are include on report."
          },
          "AlarmsSheetName": {
            "type": "string",
            "description": "Alarms sheet name (Required if IncludeAlarms=true).",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.ControllersV1Dot7.ReportNotificationDto": {
        "required": [
          "Type"
        ],
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Notification Id.",
            "nullable": true
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportNotificationType"
          },
          "Target": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportNotificationTarget"
          },
          "Format": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportFormat"
          },
          "SendAs": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.SendAsType"
          },
          "SenderAddress": {
            "type": "string",
            "description": "Sender email address(Only if Type=Email(1)).",
            "nullable": true
          },
          "Value": {
            "type": "string",
            "description": "Notification target value (Required if Type=Email(1)).",
            "nullable": true
          },
          "UserId": {
            "type": "string",
            "description": "UserId (Required if Type=AzureTableStorage).",
            "nullable": true
          },
          "ServiceKey": {
            "type": "string",
            "description": "External storage key (Required if Type=AzureTableStorage).",
            "nullable": true
          },
          "DatasetId": {
            "type": "string",
            "description": "PowerBI dataset Id (Only if Type=PowerBi(2)).",
            "nullable": true
          },
          "Path": {
            "type": "string",
            "description": "Destination path on FTP (Required if Type=Ftp(5))",
            "nullable": true
          },
          "TemplateId": {
            "type": "string",
            "description": "TemplateId used to generate the output.",
            "nullable": true
          },
          "WebhookId": {
            "type": "string",
            "description": "WebhookId use to generate the output.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.ControllersV1Dot7.ReportOccurrenceDto": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string"
          },
          "ReportId": {
            "type": "integer",
            "format": "int32"
          },
          "ReportLastEditDate": {
            "type": "string",
            "format": "date-time"
          },
          "GenerationStartUtcDate": {
            "type": "string",
            "format": "date-time"
          },
          "GenerationEndUtcDate": {
            "type": "string",
            "format": "date-time"
          },
          "Notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportOccurrenceNotification"
            },
            "nullable": true
          },
          "ErrorCode": {
            "type": "string",
            "nullable": true
          },
          "RelatedResources": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.ReportOccurrence.ReportOccurrenceRelatedResources"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.ControllersV1Dot7.ReportUserDto": {
        "type": "object",
        "properties": {
          "UserId": {
            "type": "string",
            "nullable": true
          },
          "Permission": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.SharingPermission"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Api.Server.ControllersV1Dot7.SharedWithinTheAccountDto": {
        "type": "object",
        "properties": {
          "IsSharedWithinTheAccount": {
            "type": "boolean",
            "description": "If account sharing is enable."
          },
          "Permission": {
            "$ref": "#/components/schemas/Opinum.Api.Server.ControllersV1Dot7.AccountSharingPermission"
          }
        },
        "additionalProperties": false
      },
      "Opinum.DataAnalytics.V1.StringContent": {
        "type": "object",
        "properties": {
          "Language": {
            "type": "string",
            "nullable": true
          },
          "Content": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Reports.Models.Report.Aggregate": {
        "enum": [
          "SUM",
          "MIN",
          "MAX",
          "AVG",
          "COUNT",
          "VAR",
          "STDEV"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.Granularity": {
        "enum": [
          "Raw",
          "Minute",
          "Hour",
          "Day",
          "Month",
          "Year",
          "All",
          "Week"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.NamesAndGroup": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "nullable": true
          },
          "Group": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Reports.Models.Report.Notifications.ReportFormat": {
        "enum": [
          "Excel",
          "Pdf",
          "Custom"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.Notifications.ReportNotification": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string"
          },
          "Type": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportNotificationType"
          },
          "Target": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportNotificationTarget"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Reports.Models.Report.Notifications.ReportNotificationMetadata": {
        "type": "object",
        "properties": {
          "CloudItemId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "EmailTrackingId": {
            "type": "string",
            "nullable": true
          },
          "ErrorCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Reports.Models.Report.Notifications.ReportNotificationTarget": {
        "enum": [
          "User",
          "Custom",
          "Account"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.Notifications.ReportNotificationType": {
        "enum": [
          "Email",
          "PowerBi",
          "Storage",
          "AzureTableStorage",
          "Ftp",
          "WebHook"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.Notifications.ReportOccurrenceNotification": {
        "type": "object",
        "properties": {
          "ReportNotification": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportNotification"
          },
          "NotificationMetadata": {
            "$ref": "#/components/schemas/Opinum.Reports.Models.Report.Notifications.ReportNotificationMetadata"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Reports.Models.Report.Notifications.SendAsType": {
        "enum": [
          "Link",
          "Attachment"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.PeriodType": {
        "enum": [
          "RelativeDate",
          "AbsoluteDate",
          "LastNPoints"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.ReportDataSourceType": {
        "enum": [
          "GivenVariable",
          "SavedView"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.ReportSelectMode": {
        "enum": [
          "All",
          "Top"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.SharingPermission": {
        "enum": [
          "Read",
          "ReadWrite",
          "Owner"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.SharingStatus": {
        "enum": [
          "Private",
          "Shared",
          "PublicReadOnly",
          "PublicEditable"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.Report.TimePeriod": {
        "enum": [
          "Minute",
          "Hour",
          "Day",
          "Week",
          "Month",
          "Year"
        ],
        "type": "string"
      },
      "Opinum.Reports.Models.ReportOccurrence.ReportOccurrenceRelatedResources": {
        "type": "object",
        "properties": {
          "SourceIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "SiteIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "VariableIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Reports.V1.DataSourceDataType": {
        "enum": [
          "Live",
          "Historical"
        ],
        "type": "string"
      },
      "Opinum.Storage.UploadFromIdCst": {
        "enum": [
          "WebSite",
          "Ftp",
          "ReportScheduler",
          "MapForceFileProcessor",
          "MasterDataFileProcessor",
          "PushApi",
          "ToolingCenter"
        ],
        "type": "string"
      },
      "Opinum.Storage.V1.MapForceFile": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int32"
          },
          "Name": {
            "type": "string",
            "nullable": true
          },
          "StorageName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Storage.V1.StorageItemTypeEnum": {
        "enum": [
          "Image",
          "Word",
          "Excel",
          "Pdf",
          "Text",
          "Archive",
          "Data"
        ],
        "type": "string"
      },
      "Opinum.Variables.Models.Aggregate": {
        "enum": [
          "None",
          "SUM",
          "MIN",
          "MAX",
          "AVG",
          "COUNT",
          "VAR",
          "STDEV"
        ],
        "type": "string"
      },
      "Opinum.Variables.Models.DetectionState": {
        "enum": [
          "Active",
          "Inactive"
        ],
        "type": "string"
      },
      "Opinum.Views.Column": {
        "type": "object",
        "properties": {
          "Field": {
            "type": "string",
            "nullable": true
          },
          "Size": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Views.Logic": {
        "enum": [
          "And",
          "Or"
        ],
        "type": "string"
      },
      "Opinum.Views.OperatorApi": {
        "enum": [
          "eq",
          "neq",
          "startswith",
          "contains",
          "doesnotcontain",
          "endswith",
          "isnull",
          "isnotnull",
          "isempty",
          "isnotempty",
          "gt",
          "gte",
          "lt",
          "lte"
        ],
        "type": "string"
      },
      "Opinum.Views.SharingPermission": {
        "enum": [
          "Read",
          "ReadWrite",
          "Owner"
        ],
        "type": "string"
      },
      "Opinum.Views.SortDirection": {
        "enum": [
          "Asc",
          "Desc"
        ],
        "type": "string"
      },
      "Opinum.Views.ViewUsageType": {
        "enum": [
          "Dashboard",
          "Report",
          "Alarm"
        ],
        "type": "string"
      },
      "Opisense.Models.Shared.DataPoint": {
        "type": "object",
        "properties": {
          "VariableId": {
            "type": "integer",
            "format": "int32"
          },
          "Date": {
            "type": "string",
            "format": "date-time"
          },
          "DateWithOffset": {
            "type": "string",
            "format": "date-time"
          },
          "Value": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "System.Collections.Generic.IAsyncEnumerable`1[[EnergyImpact.Shared.Core.Invitations.Invitation, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": {
        "type": "object",
        "additionalProperties": false
      },
      "System.Collections.Generic.IAsyncEnumerable`1[[EnergyImpact.Shared.Core.Models.SourceLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": {
        "type": "object",
        "additionalProperties": false
      },
      "System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserInfoLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": {
        "type": "object",
        "additionalProperties": false
      },
      "System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserInfoViewModel, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": {
        "type": "object",
        "additionalProperties": false
      },
      "System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserLight, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": {
        "type": "object",
        "additionalProperties": false
      },
      "System.Collections.Generic.IAsyncEnumerable`1[[Opinum.Api.Core.Users.Models.UserVisibleToMe, Opinum.Api.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]": {
        "type": "object",
        "additionalProperties": false
      },
      "System.Text.Json.JsonDocument": {
        "type": "object",
        "properties": {
          "RootElement": {
            "$ref": "#/components/schemas/System.Text.Json.JsonElement"
          }
        },
        "additionalProperties": false
      },
      "System.Text.Json.JsonElement": {
        "type": "object",
        "properties": {
          "ValueKind": {
            "$ref": "#/components/schemas/System.Text.Json.JsonValueKind"
          }
        },
        "example": {
          "name": "Example",
          "details": "Any json object matching the section schema"
        }
      },
      "System.Text.Json.JsonValueKind": {
        "enum": [
          "Undefined",
          "Object",
          "Array",
          "String",
          "Number",
          "True",
          "False",
          "Null"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.AggregateDto": {
        "enum": [
          "NONE",
          "SUM",
          "MIN",
          "MAX",
          "AVG",
          "COUNT",
          "VAR",
          "STDEV"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.AlarmStateDto": {
        "enum": [
          "None",
          "PresentAck",
          "PresentNotAck",
          "NotPresentAck",
          "NotPresentNotAck",
          "Inhibited",
          "Uncertain"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.AlarmStateFilterDto": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.AlarmStateDto"
          },
          "color": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.AlarmsDataSourceDto": {
        "type": "object",
        "properties": {
          "alarmId": {
            "type": "string",
            "description": "Alarm Id (Required when type = 0)",
            "nullable": true
          },
          "alarmTemplateId": {
            "type": "string",
            "description": "Alarm template Id (Required when type = 1)",
            "nullable": true
          },
          "alarmViewId": {
            "type": "string",
            "description": "Alarm view Id (Required when type = 2)",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.AlarmsDataSourceTypeDto"
          },
          "displayId": {
            "type": "integer",
            "description": "Axis id (required if Tile.VisualizationType=1).",
            "format": "int32",
            "nullable": true
          },
          "siteId": {
            "type": "integer",
            "description": "Site Id of view Datasource",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.AlarmsDataSourceTypeDto": {
        "enum": [
          "Alarm",
          "AlarmTemplate",
          "AlarmView"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.ColumnsSortingDto": {
        "type": "object",
        "properties": {
          "columnIndex": {
            "type": "integer",
            "format": "int32"
          },
          "sortingOrder": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.SortingOrderDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.CoordinatesDataSourceDto": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.CoordinatesDataSourceTypeDto"
          },
          "siteId": {
            "type": "integer",
            "description": "Site Id (Required when Type = 0)",
            "format": "int32",
            "nullable": true
          },
          "viewId": {
            "type": "string",
            "description": "View Id (Required when Type = 1 OR 2)",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "Color (Only when Type = 0)",
            "nullable": true
          },
          "colorType": {
            "type": "integer",
            "description": "MapColorTypes (Required if Type==\"Site\").\nCustom=0,SiteType=1",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.CoordinatesDataSourceTypeDto": {
        "enum": [
          "Site",
          "SiteView",
          "SourceView"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.DashboardDto": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Dashboard Id.",
            "nullable": true
          },
          "name": {
            "minLength": 1,
            "type": "string",
            "description": "Dashboard name."
          },
          "siteId": {
            "type": "integer",
            "description": "The site Id or the dashboard (if it is a site dashboard).",
            "format": "int32",
            "nullable": true
          },
          "sourceId": {
            "type": "integer",
            "description": "The source Id or the dashboard (if it is a source dashboard).",
            "format": "int32",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardUserDto"
            },
            "description": "List of users able to access to the dashboard.",
            "nullable": true
          },
          "tiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardTileDto"
            },
            "description": "List of dashboards tiles.",
            "nullable": true
          },
          "publicSharing": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DashboardPublicSharingDto"
          },
          "sharedWithinTheAccount": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.SharedWithinTheAccountDto"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/System.Text.Json.Nodes.JsonNode"
            },
            "description": "JSON formatted additional data (max 2000 characters)",
            "nullable": true
          },
          "geozoneFilter": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.GeozoneFilterDto"
          },
          "timeFrameFilter": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TimeFrameFilterDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.DashboardPublicSharingDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "If public sharing is enable."
          },
          "backgroundColor": {
            "type": "string",
            "description": "Public dashboard backgrounds color.",
            "nullable": true
          },
          "tileColor": {
            "type": "string",
            "description": "Public dashboard tiles color.",
            "nullable": true
          },
          "logoDisplayName": {
            "type": "string",
            "description": "Name of logo file.",
            "nullable": true
          },
          "logoInternalName": {
            "type": "string",
            "description": "Name of logo file in internal storage.",
            "nullable": true
          },
          "fitToScreen": {
            "type": "boolean",
            "description": "If true, force public dashboard to fit to screen."
          },
          "token": {
            "type": "string",
            "description": "Public dashboard tiles token.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.DashboardTileDto": {
        "required": [
          "title",
          "visualSourceType"
        ],
        "type": "object",
        "properties": {
          "title": {
            "minLength": 1,
            "type": "string",
            "description": "Tile title."
          },
          "fullScreen": {
            "type": "boolean",
            "description": "if the tile is fullscreen"
          },
          "visualSourceType": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.VisualSourceTypeDto"
          },
          "iframeUrl": {
            "type": "string",
            "description": "Iframe url (only if VisualSourceType=4).",
            "nullable": true
          },
          "powerbiAccount": {
            "type": "string",
            "description": "PowerBI account (only if VisualSourceType=1).",
            "nullable": true
          },
          "powerbiUserId": {
            "type": "string",
            "description": "Data Hub userId (only if VisualSourceType=1).",
            "nullable": true
          },
          "powerbiDashboard": {
            "type": "string",
            "description": "PowerBI dashboard (only if VisualSourceType=1).",
            "nullable": true
          },
          "powerbiTile": {
            "type": "string",
            "description": "PowerBI tile (only if VisualSourceType=1).",
            "nullable": true
          },
          "visualizationType": {
            "type": "integer",
            "description": "Type of visualization (only if VisualSourceType=0 OR VisualSourceType=7 OR VisualSourceType=8).",
            "format": "int32"
          },
          "timeFrame": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TimeFrameDto"
          },
          "granularity": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.GranularityDto"
          },
          "useGradientColors": {
            "type": "boolean",
            "description": "If gradient is use (only if VisualSourceType=0 when VisualizationType=2 or VisualizationType=6)."
          },
          "gradientColorNumber": {
            "type": "integer",
            "description": "Number of gradient colors (2-3. When UseGradientColors is true).",
            "format": "int32",
            "nullable": true
          },
          "gradientBeginColor": {
            "type": "string",
            "description": "Color of the beginning of the gradient (When UseGradientColors is true).",
            "nullable": true
          },
          "gradientMediumColor": {
            "type": "string",
            "description": "Medium color of the gradient of the gradient (When UseGradientColors is true and UseGradientColors=3).",
            "nullable": true
          },
          "gradientEndColor": {
            "type": "string",
            "description": "Color of the ending of the gradient (When UseGradientColors is true).",
            "nullable": true
          },
          "dataSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DataSourceDto"
            },
            "description": "List of datasources (only if VisualSourceType=0).",
            "nullable": true
          },
          "alarmsDataSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.AlarmsDataSourceDto"
            },
            "description": "List of alarms datasources (only if VisualSourceType=7).",
            "nullable": true
          },
          "coordinatesDataSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.CoordinatesDataSourceDto"
            },
            "description": "List of coordinates datasources (only if VisualSourceType=8).",
            "nullable": true
          },
          "tableRowsDataSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TableRowDataSourceDto"
            },
            "description": "List of table rows datasources (only if VisualSourceType=9).",
            "nullable": true
          },
          "tableColumnsDataSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TableColumnDataSourceDto"
            },
            "description": "List of table columns datasources (only if VisualSourceType=9).",
            "nullable": true
          },
          "columnsSorting": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.ColumnsSortingDto"
          },
          "numberOfRowsPerPage": {
            "type": "integer",
            "description": "Number of rows per page (only if VisualSourceType=9).",
            "format": "int32"
          },
          "xData": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DataSourceDto"
          },
          "axisId": {
            "type": "integer",
            "description": "Axis id (only if VisualSourceType=0).",
            "format": "int32"
          },
          "grouping": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.GroupingDto"
          },
          "comparison": {
            "type": "boolean",
            "description": "If comparison between two values (only if VisualSourceType=0 and VisualizationType=4)."
          },
          "comparisonBetter": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.ValueComparisonDto"
          },
          "selectedImage": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.ImageItemDto"
          },
          "content": {
            "type": "string",
            "description": "HTML content (only if VisualSourceType=6).",
            "nullable": true
          },
          "displayContentScrollbar": {
            "type": "boolean",
            "description": "Display Content Scrollbar (only if VisualSourceType=6)."
          },
          "dataType": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DataSourceTypeDto"
          },
          "displayValue": {
            "type": "boolean",
            "description": "Display value on the graphic (only if VisualSourceType=0 and VisualizationType < 4)"
          },
          "displayValueType": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.DisplayValueTypeDto"
          },
          "enableZoomOnRaw": {
            "type": "boolean",
            "description": "Enable the zoom feature on tile (only if VisualSourceType=0 and VisualizationType=1 and Granularity=RAW(0))",
            "deprecated": true
          },
          "enableZoom": {
            "type": "boolean",
            "description": "Enable the zoom feature on tile (only if VisualSourceType=0 and VisualizationType=1)"
          },
          "primaryAxisZeroBased": {
            "type": "boolean",
            "description": "If true, the primary Y axis starts at zero regardless of the data range."
          },
          "secondaryAxisZeroBased": {
            "type": "boolean",
            "description": "If true, the secondary Y axis starts at zero regardless of the data range."
          },
          "gridConfiguration": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.GridConfigurationDto"
          },
          "alarmStateFilters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.AlarmStateFilterDto"
            },
            "description": "List of alarms states (Required if VisualSourceType=7).",
            "nullable": true
          },
          "geozoneFilter": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.GeozoneFilterDto"
          },
          "standalone": {
            "type": "boolean",
            "nullable": true,
            "deprecated": true
          },
          "timeFrameStandalone": {
            "type": "boolean",
            "description": "The timeframe defined in the dashboard is ignored. That's the timeframe of the tile that is applied."
          },
          "geoZoneStandalone": {
            "type": "boolean",
            "description": "The data sources won't be filtered by the geozone defined in the dashboard."
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.DashboardUserDto": {
        "required": [
          "userId"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "minLength": 1,
            "type": "string"
          },
          "permission": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.SharingPermissionDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.DataSourceDto": {
        "required": [
          "unitId"
        ],
        "type": "object",
        "properties": {
          "isView": {
            "type": "boolean",
            "description": "If the dataSource is a view."
          },
          "shift": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.ShiftDto"
          },
          "aggregation": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.AggregateDto"
          },
          "aggregationByDatasource": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.SecondLevelAggregationDto"
          },
          "unitId": {
            "type": "integer",
            "description": "Unit Id",
            "format": "int32"
          },
          "selectedMode": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.SelectModeDto"
          },
          "selectedNumbers": {
            "type": "integer",
            "description": "Number of sources uses from view (Required if SelectedMode is Top).",
            "format": "int32",
            "nullable": true
          },
          "savedViewId": {
            "type": "string",
            "description": "Id of dataSources view (Required if IsView is true).",
            "nullable": true
          },
          "siteId": {
            "type": "integer",
            "description": "Site Id (Required if IsView is false).",
            "format": "int32",
            "nullable": true
          },
          "displayId": {
            "type": "integer",
            "description": "Display type (required if Tile.VisualizationType=1).",
            "format": "int32",
            "nullable": true
          },
          "axisId": {
            "type": "integer",
            "description": "Axis id (required if Tile.VisualizationType=1,2,3,5).",
            "format": "int32",
            "nullable": true
          },
          "color": {
            "type": "string",
            "description": "DataSource color (only if IsView= false or AggregationByView!=None).",
            "nullable": true
          },
          "sourceId": {
            "type": "integer",
            "description": "Source Id (Required if IsView is false).",
            "format": "int32",
            "nullable": true
          },
          "variableIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Variable Ids (Required if IsView is false).",
            "nullable": true
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Group names.",
            "nullable": true
          },
          "variables": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.VariableLightDto"
            },
            "description": "Variable names (Required if IsView is true).",
            "nullable": true
          },
          "trendLine": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TrendLineDto"
          },
          "trendLineParameter": {
            "type": "integer",
            "description": "Trend line parameter (only if TrendLine=Polynomial or TrendLine=Loess).",
            "format": "int32",
            "nullable": true
          },
          "alias": {
            "type": "string",
            "description": "Alias/name If present, the dataSource is a form dataSource (only for x-axis datasources).",
            "nullable": true
          },
          "formId": {
            "type": "string",
            "description": "Form Id (only for x-axis datasources is alias is set).",
            "nullable": true
          },
          "groupId": {
            "type": "integer",
            "description": "Group Id (only for x-axis datasources is alias is set).",
            "format": "int32",
            "nullable": true
          },
          "entityType": {
            "type": "integer",
            "description": "Entity Id (only for x-axis datasources is alias is set).",
            "format": "int32",
            "nullable": true
          },
          "propId": {
            "type": "integer",
            "description": "Prop Id (only for x-axis datasources is alias is set).",
            "format": "int32",
            "nullable": true
          },
          "legend": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.LegendItemDto"
            },
            "description": "Dictionary of legend fields.",
            "nullable": true
          },
          "colorType": {
            "type": "integer",
            "description": "MapColorTypes (Required if Tile.VisualizationType = 6 | 7).\nIf IsView = false: Custom=0,SiteType=1",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.DataSourceTypeDto": {
        "enum": [
          "DataSource",
          "FormDataSource"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.DisplayValueTypeDto": {
        "enum": [
          "Percent",
          "Value"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.GeozoneFilterDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Enable Geozone filter"
          },
          "mainGeozoneTypeId": {
            "type": "string",
            "description": "Id of the main Geozone type",
            "nullable": true
          },
          "mainGeozoneId": {
            "type": "string",
            "description": "Id of the main Geozone",
            "nullable": true
          },
          "enableSecondaryGeozoneTypes": {
            "type": "boolean",
            "description": "Enable Secondary Geozones Types selection"
          },
          "secondaryGeozoneTypeIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of the Secondary Geozone Types",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.GetDataSourceLegendType": {
        "enum": [
          "View",
          "Variable",
          "PointView",
          "PointVariable",
          "TableVariable",
          "TableProperty"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.GranularityDto": {
        "enum": [
          "Raw",
          "Minute",
          "Hour",
          "Day",
          "Month",
          "Year",
          "All",
          "Week"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.GridConfigurationDto": {
        "type": "object",
        "properties": {
          "x": {
            "type": "integer",
            "format": "int32"
          },
          "y": {
            "type": "integer",
            "format": "int32"
          },
          "cols": {
            "type": "integer",
            "format": "int32"
          },
          "rows": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.GroupingDto": {
        "enum": [
          "None",
          "Day",
          "Week",
          "Month",
          "Year"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.ImageItemDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Item Id.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Item name.",
            "nullable": true
          },
          "thumbnailUri": {
            "type": "string",
            "description": "Thumbnail uri (if image).",
            "nullable": true
          },
          "storageName": {
            "type": "string",
            "description": "File name in storage.",
            "nullable": true
          },
          "fileName": {
            "type": "string",
            "description": "File name.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.LegendItemDto": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Item type (/dashboards/legend to see allowed types)",
            "nullable": true
          },
          "checked": {
            "type": "boolean",
            "description": "If the type is enabled"
          },
          "customValue": {
            "type": "string",
            "description": "Custom value (only when Type=Custom)",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.PeriodDto": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.PeriodTypeDto": {
        "enum": [
          "PastPeriod",
          "PastAndCurrentPeriod",
          "CurrentPeriod",
          "Absolute"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.SecondLevelAggregationDto": {
        "enum": [
          "NONE",
          "SUM",
          "MIN",
          "MAX",
          "AVG",
          "COUNT"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.SelectModeDto": {
        "enum": [
          "All",
          "Top"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.SharedWithinTheAccountDto": {
        "type": "object",
        "properties": {
          "isSharedWithinTheAccount": {
            "type": "boolean",
            "description": "If account sharing is enable."
          },
          "permission": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.SharingPermissionDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.SharingPermissionDto": {
        "enum": [
          "read",
          "readWrite",
          "owner"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.ShiftDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "integer",
            "description": "Shift value.",
            "format": "int32"
          },
          "timePeriod": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TimePeriodDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.SortingOrderDto": {
        "enum": [
          "Ascending",
          "Descending"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.TableColumnDataSourceDto": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TableColumnDataSourceType"
          },
          "propertyPath": {
            "type": "string",
            "nullable": true
          },
          "entityType": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TablePropertyEntityTypeDto"
          },
          "variableName": {
            "type": "string",
            "nullable": true
          },
          "group": {
            "type": "string",
            "nullable": true
          },
          "aggregation": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.AggregateDto"
          },
          "unitId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "shift": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.ShiftDto"
          },
          "columnSize": {
            "type": "integer",
            "format": "int32"
          },
          "headerItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Opinum.Dashboards.Dto.LegendItemDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.TableColumnDataSourceType": {
        "enum": [
          "Variable",
          "Property"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.TablePropertyEntityTypeDto": {
        "enum": [
          "Site",
          "Source"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.TableRowDataSourceDto": {
        "type": "object",
        "properties": {
          "viewId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.TimeFrameDto": {
        "type": "object",
        "properties": {
          "value": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "type": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TimePeriodTypeDto"
          },
          "period": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.PeriodDto"
          },
          "periodType": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.PeriodTypeDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.TimeFrameFilterDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Enable Time frame filter"
          },
          "timeFrame": {
            "$ref": "#/components/schemas/Opinum.Dashboards.Dto.TimeFrameDto"
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.TimePeriodDto": {
        "enum": [
          "Second",
          "Minute",
          "Hour",
          "Day",
          "Week",
          "Month",
          "Year"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.TimePeriodTypeDto": {
        "enum": [
          "Day",
          "Week",
          "Month",
          "Year"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.TrendLineDto": {
        "enum": [
          "None",
          "Linear",
          "Exponential",
          "Polynomial",
          "Power",
          "Logarithmic",
          "Loess"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.ValueComparisonDto": {
        "enum": [
          "NONE",
          "LOWER",
          "GREATER"
        ],
        "type": "string"
      },
      "Opinum.Dashboards.Dto.VariableLightDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of variable.",
            "nullable": true
          },
          "group": {
            "type": "string",
            "description": "Group of variable.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Opinum.Dashboards.Dto.VisualSourceTypeDto": {
        "enum": [
          "Points",
          "PowerBi",
          "Iframe",
          "Image",
          "Content",
          "Alarms",
          "Coordinates",
          "Table"
        ],
        "type": "string"
      },
      "System.Text.Json.Nodes.JsonNode": {
        "type": "object",
        "properties": {
          "options": {
            "$ref": "#/components/schemas/System.Text.Json.Nodes.JsonNodeOptions"
          },
          "parent": {
            "$ref": "#/components/schemas/System.Text.Json.Nodes.JsonNode"
          },
          "root": {
            "$ref": "#/components/schemas/System.Text.Json.Nodes.JsonNode"
          }
        },
        "additionalProperties": false
      },
      "System.Text.Json.Nodes.JsonNodeOptions": {
        "type": "object",
        "properties": {
          "propertyNameCaseInsensitive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CreateGeozoneJobInfo": {
        "type": "object",
        "properties": {
          "jobTrackerId": {
            "type": "string",
            "nullable": true,
            "example": "64d0b8b02879df06ac22db89"
          },
          "geozonesCount": {
            "type": "integer",
            "format": "int32",
            "example": 123
          }
        },
        "additionalProperties": false
      },
      "CreateGeozoneJobInfoIAsyncEnumerable": {
        "type": "object",
        "additionalProperties": false
      },
      "DetailedJob": {
        "type": "object",
        "properties": {
          "logs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "id": {
            "type": "string",
            "nullable": true,
            "example": "64d0b8b02879df06ac22db89"
          },
          "createdBy": {
            "type": "string",
            "nullable": true,
            "example": "John Doe"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "example": "CreateGeozones"
          },
          "state": {
            "type": "string",
            "nullable": true,
            "example": "Processing"
          },
          "processingStartDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "Geozone": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "example": "64d0b8b02879df06ac22db89"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "My Region"
          },
          "geozoneTypeId": {
            "type": "string",
            "nullable": true,
            "example": "64d0a2c19b5d9a8ad3bd6d27"
          },
          "localizedProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalizedProperty"
            },
            "nullable": true
          },
          "parentGeozoneIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true,
            "example": [
              "64d0bba8f8053a9d7b7ddda1"
            ]
          },
          "relationType": {
            "enum": [
              "Computed",
              "Provided",
              "Isolated"
            ],
            "type": "string"
          },
          "geoJson": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonNode"
            },
            "nullable": true,
            "example": {
              "coordinates": [
                [
                  [
                    4.8105836,
                    50.656395
                  ],
                  [
                    4.8105836,
                    50.653675
                  ],
                  [
                    4.817422,
                    50.653675
                  ],
                  [
                    4.817422,
                    50.656395
                  ],
                  [
                    4.8105836,
                    50.656395
                  ]
                ]
              ],
              "type": "Polygon"
            }
          }
        },
        "additionalProperties": false
      },
      "GeozoneType": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "example": "64d0b8b02879df06ac22db89"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "Regions"
          },
          "localizedProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalizedProperty"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true,
            "example": "64d0b8b02879df06ac22db89"
          },
          "createdBy": {
            "type": "string",
            "nullable": true,
            "example": "John Doe"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "nullable": true,
            "example": "CreateGeozones"
          },
          "state": {
            "type": "string",
            "nullable": true,
            "example": "Processing"
          },
          "processingStartDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "JsonNode": {
        "type": "object",
        "properties": {
          "options": {
            "$ref": "#/components/schemas/JsonNodeOptions"
          },
          "parent": {
            "$ref": "#/components/schemas/JsonNode"
          },
          "root": {
            "$ref": "#/components/schemas/JsonNode"
          }
        },
        "additionalProperties": false
      },
      "JsonNodeOptions": {
        "type": "object",
        "properties": {
          "propertyNameCaseInsensitive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "LocalizedLabel": {
        "type": "object",
        "properties": {
          "languageCode": {
            "type": "string",
            "nullable": true,
            "example": "FR"
          },
          "localizedValue": {
            "type": "string",
            "nullable": true,
            "example": "Ma Region"
          }
        },
        "additionalProperties": false
      },
      "LocalizedProperty": {
        "type": "object",
        "properties": {
          "propertyName": {
            "type": "string",
            "nullable": true,
            "example": "Name"
          },
          "localizedLabels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalizedLabel"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "NewGeozone": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "",
            "nullable": true,
            "example": "My Region"
          },
          "geoJson": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonNode"
            },
            "description": "",
            "nullable": true,
            "example": {
              "coordinates": [
                [
                  [
                    4.8105836,
                    50.656395
                  ],
                  [
                    4.8105836,
                    50.653675
                  ],
                  [
                    4.817422,
                    50.653675
                  ],
                  [
                    4.817422,
                    50.656395
                  ],
                  [
                    4.8105836,
                    50.656395
                  ]
                ]
              ],
              "type": "Polygon"
            }
          },
          "geozoneTypeId": {
            "type": "string",
            "nullable": true
          },
          "localizedProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalizedProperty"
            },
            "nullable": true
          },
          "parentGeozoneIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "relationType": {
            "enum": [
              "Computed",
              "Provided",
              "Isolated"
            ],
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "NewGeozoneType": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "",
            "nullable": true,
            "example": "Regions"
          },
          "localizedProperties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LocalizedProperty"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SiteWithGeozones": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "example": "My Site"
          },
          "geoJson": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonNode"
            },
            "nullable": true,
            "example": {
              "coordinates": [
                [
                  [
                    4.8105836,
                    50.656395
                  ],
                  [
                    4.8105836,
                    50.653675
                  ],
                  [
                    4.817422,
                    50.653675
                  ],
                  [
                    4.817422,
                    50.656395
                  ],
                  [
                    4.8105836,
                    50.656395
                  ]
                ]
              ],
              "type": "Polygon"
            }
          },
          "geozones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Geozone"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OdmConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "databaseEngine": {
            "$ref": "#/components/schemas/OdmDataBaseEngine"
          },
          "sqlConnectionString": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "OdmDataBaseEngine": {
        "enum": [
          "SqlServer",
          "SqLite",
          "PostgreSql"
        ],
        "type": "string"
      },
      "OdmTableSchemaTemplates": {
        "type": "object",
        "properties": {
          "siteTableStatement": {
            "type": "string",
            "nullable": true
          },
          "sourceTableStatement": {
            "type": "string",
            "nullable": true
          },
          "variableTableStatement": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SetupRequest": {
        "type": "object",
        "properties": {
          "sqlConnectionString": {
            "type": "string",
            "nullable": true
          },
          "dataBaseEngine": {
            "$ref": "#/components/schemas/OdmDataBaseEngine"
          },
          "overwriteExisting": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth2 Implicit Grant",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://auth.opinum.com/realms/opinum/protocol/openid-connect/auth",
            "tokenUrl": "https://auth.opinum.com/realms/opinum/protocol/openid-connect/token",
            "scopes": {
              "datahub-api": "datahub-api",
              "dashboards-api": "dashboards-api",
              "geozones-api": "geozones-api",
              "odm-api": "odm-api"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": [
        "datahub-api",
        "dashboards-api",
        "geozones-api",
        "odm-api"
      ]
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "AccountConfiguration"
    },
    {
      "name": "Alarm"
    },
    {
      "name": "AlarmTemplate"
    },
    {
      "name": "AlarmView"
    },
    {
      "name": "Alert"
    },
    {
      "name": "AlertOccurrence"
    },
    {
      "name": "AlertView"
    },
    {
      "name": "CloudItemExtention"
    },
    {
      "name": "Connector"
    },
    {
      "name": "Dashboard"
    },
    {
      "name": "Data"
    },
    {
      "name": "DataAnalytics"
    },
    {
      "name": "DataLossDetection"
    },
    {
      "name": "DataPusher"
    },
    {
      "name": "DataQualityHistory"
    },
    {
      "name": "DataQualityNotification"
    },
    {
      "name": "DataQualityOverrides"
    },
    {
      "name": "DataQualityTemplates"
    },
    {
      "name": "ErrorCode"
    },
    {
      "name": "Event"
    },
    {
      "name": "ExternalLogin"
    },
    {
      "name": "FileTrigger"
    },
    {
      "name": "Form"
    },
    {
      "name": "Gateway"
    },
    {
      "name": "Geozone"
    },
    {
      "name": "GeozoneType"
    },
    {
      "name": "Invitation"
    },
    {
      "name": "InvitationNotification"
    },
    {
      "name": "Invoice"
    },
    {
      "name": "Job"
    },
    {
      "name": "Language"
    },
    {
      "name": "Metadata"
    },
    {
      "name": "NotificationMessageStatusHistory"
    },
    {
      "name": "Organization"
    },
    {
      "name": "Report"
    },
    {
      "name": "ReportTemplate"
    },
    {
      "name": "ReportView"
    },
    {
      "name": "Schedule"
    },
    {
      "name": "Sim"
    },
    {
      "name": "Site"
    },
    {
      "name": "SiteView"
    },
    {
      "name": "Source"
    },
    {
      "name": "SourceDataQuality"
    },
    {
      "name": "SourceHistory"
    },
    {
      "name": "SourceNote"
    },
    {
      "name": "SourceView"
    },
    {
      "name": "Sql"
    },
    {
      "name": "Storage"
    },
    {
      "name": "Tag"
    },
    {
      "name": "ThemeStyle"
    },
    {
      "name": "User"
    },
    {
      "name": "UserAccount"
    },
    {
      "name": "UserView"
    },
    {
      "name": "Variable"
    },
    {
      "name": "Webhook"
    }
  ]
}