swagger: "2.0"
info:
  title: "openDCIM"
  description: "openDCIM is an open source data center inventory management application.
    API documentation shows the primary model for the data being returned.   However, in many GET
    routes a union of multiple models are returned, which is why your results may vary.  For PUT
    and POST routes, you should only push the primary model.   Additionally, CustomDeviceAtrributes
    will be returned and can be posted, but are not in the documentation as they are custom by nature.
    Many routes that may seem to be missing are intentional, but we also acknowledge that we are filling
    out the routes as the need for them arise.  Prime example - there is no POST (edit) route for AuditLog,
    because of the very nature of what it is capturing."
  version: "23.03"
  contact:
    url: "https://opendcim.org"
  license:
    name: "GPLv3"
basePath: "/api/v1"
tags:
- name: "openDCIM"
  description: "Everything about your Data Center Inventory."
  externalDocs:
    description: "Find out more"
    url: "http://wiki.opendcim.org"
paths:
  /audit:
    get:
      summary: Audit history for the requested device
      tags:
      - "AuditLogs"
      description: ''
      produces:
      - "application/json"
      operationId: "GetAuditInfo"
      parameters:
        - name: CabinetID
          in: query
          required: false
          type: string
          description: CabinetID of the cabinet you would like audit information from.
          allowEmptyValue: true
        - name: DeviceID
          in: query
          required: false
          type: string
          description: 'The DeviceID that you want the audit information for. '
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Audit"
      security:
      - api_key: []
      - user_id: []
    put:
      summary: Add a new Audit Log entry
      tags:
      - "AuditLogs"
      - "Device"
      - "Cabinet"
      description: "Enter either a DeviceID or a CabinetID.   If both are supplied, CabinetID takes precedent."
      produces:
      - "application/json"
      operationId: "PutAuditInfo"
      parameters:
        - in: query
          name: "CabinetID"
          type: integer
          required: false
          description: "KeyValue for the Cabinet to certify an audit event for."
        - in: query
          name: "DeviceID"
          type: integer
          required: false
          description: "KeyValue for the Device to certify an audit event for."
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Audit"
      security:
      - api_key: []
      - user_id: []  
  /cabinet:
    get:
      summary: Information about one or more cabinets
      tags:
      - "Cabinet"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetCabinet"
      parameters:
        - name: CabinetID
          in: query
          required: false
          type: string
          description: "A specific CabinetID for a record to retrieve from the database"
          allowEmptyValue: true
        - name: DataCenterID
          in: query
          required: false
          type: string
          description: "A specific DataCenterID to filter results by"
          allowEmptyValue: true
        - name: CabRowID
          in: query
          required: false
          type: string
          description: "A specific CabRowID to filter results by"
          allowEmptyValue: true
        - name: ZoneID
          in: query
          required: false
          type: string
          description: "A specific ZoneID to filter results by"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Cabinet"
      security:
      - api_key: []
      - user_id: []
    put:
      summary: Information about one or more cabinets
      tags:
      - "Cabinet"
      description: "Data model for the cabinet to be added to the database."
      produces:
      - "application/json"
      operationId: "CreateCabinet"
      parameters:
        - in: "body"
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/Cabinet"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Cabinet"
      security:
      - api_key: []
      - user_id: []
  /cabinet/{CabinetID}:
    post:
      summary: Update the information for a specific cabinet
      tags:
      - "Cabinet"
      description: 'Only the properties to be modified, other than the CabinetID, are required.'
      consumes:
      - "application/json"
      produces:
      - "application/json"
      operationId: "UpdateCabinet"
      parameters:
        - in: path
          name: "CabinetID"
          required: true
          type: integer
        - in: "body"
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/Cabinet"
          description: "Properties to be modified for a specific Cabinet that exists in the database."
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Cabinet"
      security:
      - api_key: []
      - user_id: []
  /datacenter:
    get:
      summary: Information about one or more data centers
      tags:
      - "DataCenter"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetDataCenter"
      parameters:
        - name: DataCenterID
          in: query
          required: false
          type: string
          description: "A specific DataCenterID for a record to retrieve from the database"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/DataCenter"
      security:
      - api_key: []
      - user_id: []
  /department:
    get:
      summary: Information about one or more departments
      tags:
      - "Department"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetDepartmentInfo"
      parameters:
        - name: DepartmentID
          in: query
          required: false
          type: string
          description: "A specific DepartmentID for a record to retrieve from the database."
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Department"
      security:
      - api_key: []
      - user_id: []
  /department/{DepartmentName}:
    put:
      summary: Create a new Department record in the database
      tags:
      - "Department"
      description: "Department entity."
      produces:
      - "application/json"
      operationId: "CreateDepartment"
      parameters:
        - in: path
          name: "DepartmentName"
          required: true
          type: string
          description: "DepartmentName must be URL encoded.   Other properties are sent within the body in JSON format."
        - in: "body"
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/Department"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Department"
      security:
      - api_key: []
      - user_id: []
  /device:
    get:
      summary: Information about one or more devices
      tags:
      - "Device"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetDevice"
      parameters:
        - name: DeviceID
          in: query
          required: false
          type: string
          description: "A specific DeviceID for a record to retrieve from the database"
          allowEmptyValue: true
        - name: Cabinet
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue.  A value of -1 retrieves items in the virtual StorageRoom."
          allowEmptyValue: true
        - name: Position
          in: query
          required: false
          type: string
          description: "Search for the device in a specific position.   For virtual StorageRoom items, pass the DataCenterID in this value."
          allowEmptyValue: true
        - name: DataCenterID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue (does not work for StorageRoom - see note for Position)."
          allowEmptyValue: true
        - name: CabRowID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue"
          allowEmptyValue: true
        - name: ZoneID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Device"
      security:
      - api_key: []
      - user_id: []
  /device/{DeviceID}:
    post:
      summary: Update the information for a specific device
      tags:
      - "Device"
      description: 'Only the properties to be modified, other than the DeviceID, are required.'
      consumes:
      - "application/json"
      produces:
      - "application/json"
      operationId: "UpdateDevice"
      parameters:
        - in: path
          name: "DeviceID"
          required: true
          type: integer
        - in: "body"
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/Device"
          description: "Properties to be modified for a specific Device that exists in the database."
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Device"
      security:
      - api_key: []
      - user_id: []
  /device/{DeviceID}/store:
    post:
      summary: Move the specified device to the storage room
      tags:
      - "Device"
      description: ''
      produces:
      - "application/json"
      operationId: "MoveToStorage"
      parameters:
        - in: path
          name: "DeviceID"
          required: true
          type: integer
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
      security:
      - api_key: []
      - user_id: []
  /device/{DeviceID}/getsensorreadings:
    get:
      summary: Sensor information for a specific device
      tags:
      - "Device"
      - "SensorReading"
      description: 'The last read sensor values for a specific device.'
      produces:
      - "application/json"
      operationId: "GetSensorReadings"
      parameters:
        - name: DeviceID
          in: path
          required: true
          type: integer
          description: "A specific keyValue DeviceID for a record to retrieve from the database"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/SensorReading"
      security:
      - api_key: []
      - user_id: []
  /device/{DeviceLabel}:
    put:
      summary: Create a new device
      tags:
      - "Device"
      description: 'Create a new device based upon the properties provided.'
      consumes:
      - "application/json"
      produces:
      - "application/json"
      operationId: "CreateDevice"
      parameters:
        - in: path
          name: "DeviceLabel"
          required: true
          type: string
        - in: "body"
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/Device"
          description: "Properties for the Device to be added to the database."
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Device"
      security:
      - api_key: []
      - user_id: []
  /devicetemplate:
    get:
      summary: Template information for devices.   Some of the properties are contextual and are not returned for all devices.
      tags:
      - "DeviceTemplate"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetDeviceTemplate"
      parameters:
        - name: TemplateID
          in: query
          required: false
          type: string
          description: "A specific TemplateID for a record to retrieve from the database"
          allowEmptyValue: true
        - name: ManufacturerID
          in: query
          required: false
          type: string
          description: "A specific ManufacturerID to filter results from the database"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/DeviceTemplate"
      security:
      - api_key: []
      - user_id: []
  /devicetemplate/{TemplateID}:
    post:
      summary: Update template information for devices.
      tags:
      - "DeviceTemplate"
      description: 'You only need to pass the parameters that are being updated.   Any missing parameters keep the existing values..'
      consumes:
      - "application/json"
      produces:
      - "application/json"
      operationId: "UpdateDeviceTemplate"
      parameters:
        - name: TemplateID
          in: path
          required: false
          type: string
          description: "A specific TemplateID for a record to retrieve from the database"
          allowEmptyValue: true
        - name: "body"
          in: body
          required: true
          schema:
            type: "array"
            items:
              $ref: "#/definitions/DeviceTemplate"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/DeviceTemplate"
      security:
      - api_key: []
      - user_id: []
  /deviceport/{DeviceID}:
    get:
      summary: Port information about a specific device
      tags:
      - "DevicePort"
      description: "Connection information about a specific device."
      produces:
      - "application/json"
      operationId: "GetDevicePorts"
      parameters:
        - name: DeviceID
          in: path
          required: false
          type: string
          description: "A specific DeviceID for a record to retrieve from the database"
          allowEmptyValue: false
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/DevicePort"
      security:
      - api_key: []
      - user_id: []
  /disposition:
    get:
      summary: Information about all disposal methods
      tags:
      - "Disposition"
      description: "Mechanisms for grouping items that are disposed of in a specific way, such as resale, return to customer, etc"
      produces:
      - "application/json"
      operationId: "GetDisposition"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Disposition"
      security:
      - api_key: []
      - user_id: []
  /disposition/{DispositionID}:
    get:
      summary: Information about a specific disposal method and the devices attached to it
      tags:
      - "Disposition"
      description: "Mechanisms for grouping items that are disposed of in a specific way, such as resale, return to customer, etc"
      produces:
      - "application/json"
      operationId: "GetDisposition"
      parameters:
        - name: DispositionID
          in: path
          require: false
          type: integer
          description: "The keyValue for a specific disposition method to retrieve"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Disposition"
      security:
      - api_key: []
      - user_id: []
  /people:
    get:
      summary: Information about one or more people
      tags:
      - "People"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetPersonInfo"
      parameters:
        - name: PersonID
          in: query
          required: false
          type: string
          description: "A specific PersonID for a record to retrieve from the database"
          allowEmptyValue: true
        - name: UserID
          in: query
          required: false
          type: string
          description: "A specific UserID for a record to retrieve from the database"
          allowEmptyValue: true
        - name: Email
          in: query
          required: false
          type: string
          description: "A specific EmailAddress for a record to retrieve from the database"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Person"
      security:
      - api_key: []
      - user_id: []
  /people/{PersonID}:
    post:
      summary: Modify an existing person entry in the database
      tags:
      - "People"
      description: ''
      consumes:
      - "application/json"
      produces:
      - "application/json"
      operationId: "UpdatePerson"
      parameters:
        - in: "path"
          name: "UserID"
          required: true
          type: string
          description: "PersonID of the record being modified"
        - in: "body"
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/Person"
          description: Data to be updated for the specified entry in the People table
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Person"
      security:
      - api_key: []
      - user_id: []
  /people/{UserID}:
    put:
      summary: Add a new person to the database
      tags:
      - "People"
      description: ''
      consumes:
      - "application/json"
      produces:
      - "application/json"
      operationId: "CreatePerson"
      parameters:
        - in: "path"
          name: "UserID"
          required: true
          type: string
          description: "UserID of the record being added"
        - in: "body"
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/Person"
          description: Data to be placed as an entry in the People table
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Person"
      security:
      - api_key: []
      - user_id: []
  /people/{PersonID}/transferdevicesto/{TargetPersonID}:
    post:
      summary: Transfer devices from one person to another
      tags:
      - "People"
      - "Device"
      description: ''
      produces:
      - "application/json"
      operationId: "UpdatePerson"
      parameters:
        - in: "path"
          name: "PersonID"
          required: true
          type: integer
          description: "PersonID that devices are being transferred from"
        - in: "path"
          name: "TargetPersonID"
          required: true
          type: integer
          description: PersonID to transfer the devices to
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
      security:
      - api_key: []
      - user_id: [] 
  /pollers/power:
    get:
      summary: Retrieve a list of pollable CDU (Power Sensor) devices matching the specified filter criteria, with a DeviceType of CDU and valid SNMP information.
      tags:
      - "Device"
      - "PDUStats"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetSensors"
      parameters:
        - name: Cabinet
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue.  A value of -1 retrieves items in the virtual StorageRoom."
          allowEmptyValue: true
        - name: DataCenterID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue (does not work for StorageRoom - see note for Position)."
          allowEmptyValue: true
        - name: CabRowID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue"
          allowEmptyValue: true
        - name: ZoneID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              allOf:
                -  $ref: "#/definitions/Device"
                -  $ref: "#/definitions/DeviceTemplate"
      security:
      - api_key: []
      - user_id: []         
  /pollers/sensors:
    get:
      summary: Retrieve a list of pollable Sensor devices matching the specified filter criteria, with a DeviceType of Sensor and valid SNMP information.
      tags:
      - "Device"
      description: 'If no parameters are specified, all record information that you are authorized to view is returned.'
      produces:
      - "application/json"
      operationId: "GetSensors"
      parameters:
        - name: Cabinet
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue.  A value of -1 retrieves items in the virtual StorageRoom."
          allowEmptyValue: true
        - name: DataCenterID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue (does not work for StorageRoom - see note for Position)."
          allowEmptyValue: true
        - name: CabRowID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue"
          allowEmptyValue: true
        - name: ZoneID
          in: query
          required: false
          type: string
          description: "Filter results to those that match the given keyValue"
          allowEmptyValue: true
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              allOf:
                -  $ref: "#/definitions/Device"
                -  $ref: "#/definitions/DeviceTemplate"
      security:
      - api_key: []
      - user_id: []         
  /powerport/{DeviceID}:
    get:
      summary: Power Port information for a specific device
      tags:
      - "PowerPort"
      - "Device"
      description: "Returns connection information about the power ports on a specific device"
      produces:
      - "application/json"
      operationId: "GetPowerPorts"
      parameters:
        - in: path
          name: "DeviceID"
          required: true
          type: string
          description: "keyValue of the DeviceID to be queried"        
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/PowerPort"
      security:
      - api_key: []
      - user_id: []
    post:
      summary: Update Power Port information for a specific device
      tags:
      - "PowerPort"
      - "Device"
      description: "Returns connection information about the power ports on a specific device"
      produces:
      - "application/json"
      operationId: "UpdatePowerPort"
      parameters:
        - in: path
          name: "DeviceID"
          required: true
          type: string
          description: "keyValue of the DeviceID to be updated"
        - in: body
          name: "body"
          required: true
          schema:
            type: "array"
            items:
              $ref: "#/definitions/PowerPort"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
      security:
      - api_key: []
      - user_id: []
  /project:
    get:
      summary: Metadata about all projects
      tags:
      - "Project"
      description: 'Returns the metadata about projects in the system, but not members of the projects.'
      produces:
      - "application/json"
      operationId: "GetProjectList"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Project"
      security:
      - api_key: []
      - user_id: []
  /project/bycabinet/{CabinetID}:
    get:
      summary: Metadata about all projects associated with a specific cabinet
      tags:
      - "Project"
      - "Cabinet"
      description: 'Returns the metadata about projects in the system assigned to a specific cabinet.'
      produces:
      - "application/json"
      operationId: "GetProjectsByCabinet"
      parameters:
        - name: CabinetID
          in: path
          required: false
          type: string
          description: "A specific CabinetID for a record to retrieve from the database"
          allowEmptyValue: false
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Project"
      security:
      - api_key: []
      - user_id: []
  /project/bydevice/{DeviceID}:
    get:
      summary: Metadata about all projects associated with a specific device
      tags:
      - "Project"
      description: 'Returns the metadata about projects in the system, but not members of the projects.'
      produces:
      - "application/json"
      operationId: "GetProjectsByDevice"
      parameters:
        - name: DeviceID
          in: path
          required: false
          type: string
          description: "A specific DeviceID for a record to retrieve from the database"
          allowEmptyValue: false
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Project"
      security:
      - api_key: []
      - user_id: []
  /pdustats/{PDUID}:
    get:
      summary: Data from the most recent poll of the PDU Devices 
      tags:
      - "PDUStats"
      - "Device"
      description: "Retrieves the most recent polling data for a PDU"
      produces:
      - "application/json"
      operationId: "GetPDUStats"
      parameters:
        - in: path
          name: "PDUID"
          required: true 
          type: string
          description: "keyValue of the DeviceID matching the PDU"
      responses:
        "401":
          description: "Access denied."
        "404":
          description: "No polling data recorded."
        "200":
          schema:
            type: "array"
            items:
              $ref: "#definitions/PDUStats"
      security:
      - api_key: []
      - user_id: []
  /pdustats:
    post:
      summary: Update PDU Reading for a specific device
      tags:
      - "PDUStats"
      - "Device"
      description: "Updates a power device with a new reading"
      produces:
      - "application/json"
      operationId: "UpdatePDUStats"
      parameters:
        - in: body
          name: "body"
          required: true
          schema:
            $ref: "#/definitions/PDUStats"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
      security:
      - api_key: []
      - user_id: []
  /sensorreadings/{SensorID}:
    post:
      summary: Update Sensor Reading for a specific device
      tags:
      - "SensorReading"
      - "Device"
      description: "Updates a sensor with a new reading"
      produces:
      - "application/json"
      operationId: "UpdateSensorReadings"
      parameters:
        - in: path
          name: "SensorID"
          required: true
          type: string
          description: "keyValue of the DeviceID to be updated"
        - in: body
          name: "body"
          required: true
          schema:
            type: "array"
            items:
              $ref: "#/definitions/SensorReading"
      responses:
        "401":
          description: "Access denied."
        "200":
          description: "successful operation"
      security:
      - api_key: []
      - user_id: []
definitions:
  Audit:
    type: "object"
    properties:
      UserID:
        type: "string"
        format: "username"
      Class:
        type: "string"
        format: "Type of action performed"
      ObjectID:
        type: "number"
        format: "keyValue"
      ChildID:
        type: "number"
        format: "keyValue"
      Action:
        type: "string"
        enum:
        - "CertifyAudit"
      Property:
        type: "string"
        format: "objectPropertyName"
      OldVal:
        type: "string"
        format: "Dependent on objectProperty"
      NewVal:
        type: "string"
        format: "Dependent on objectProperty"
      Time:
        type: "string"
        format: "Timestamp"
  Cabinet:
    type: "object"
    properties:
      CabinetID:
        type: "number"
        format: "keyValue"
      DataCenterID:
        type: "number"
        format: "keyValue"
      Location:
        type: "string"
        format: "Location designation"
      LocationSortable:
        type: "string"
        format: "Alternate location designator used for sorting"
      AssignedTo:
        type: "number"
        format: "keyValue of Department that owns cabinet"
      ShowCabinetLabel:
        type: "boolean"
        format: "Show labels for devices in cabinet"
      ZoneID:
        type: "number"
        format: "keyValue for Zone cabinet is assigned to (if any)"
      CabRowID:
        type: "number"
        format: "keyValue for Cabinet Row"
      CabinetHeight:
        type: "number"
        format: "Height of cabinet in Rack Units"
      Model:
        type: "string"
        format: "Model information of cabinet"
      Keylock:
        type: "string"
        format: "Key or lock information."
      MaxKW:
        type: "number"
        format: "Maximum kW design for this location."
      MaxWeight:
        type: "number"
        format: "Maximum weight (units per localization) for this location"
      InstallationDate:
        type: "number"
        format: "Datestamp"
      MapX1:
        type: "number"
        format: "Coordinates for location on the data center map."
      MapX2:
        type: "number"
        format: "Coordinates for location on the data center map."
      MapY1:
        type: "number"
        format: "Coordinates for location on the data center map."
      MapY2:
        type: "number"
        format: "Coordinates for location on the data center map."
      FrontEdge:
        type: "string"
        enum:
        - "Top"
        - "Bottom"
        - "Left"
        - "Right"
      Notes:
        type: "string"
        format: "Freeform text notes for the cabinet"
      U1Position:
        type: "string"
        enum:
        - "Bottom"
        - "Top"
  DataCenter:
    type: "object"
    properties:
      DataCenterID:
        type: "number"
        format: "keyValue"
      Name:
        type: "string"
        format: "Freeform text"
      SquareFootage:
        type: "number"
        format: "Model is in English units, but if localized to Metric, will show meters"
      DeliveryAddress:
        type: "string"
        format: "Freeform text"
      Administrator:
        type: "string"
        format: "Freeform text"
      MaxkW:
        type: "number"
        format: "Maximum kW load this data center is rated for"
      DrawingFilename:
        type: "string"
        format: "Relative path to drawing filename"
      EntryLogging:
        type: "boolean"
        format: "Deprecated"
      ContainerID:
        type: "number"
        format: "keyValue of container parent (if any)"
      MapX:
        type: "number"
        format: "Geometry of the drawing file in X coordinates"
      MapY:
        type: "number"
        format: "Geometry of the drawing file in Y coordinates"
      U1Position:
        type: "string"
        enum:
        - "Bottom"
        - "Top"
  Department:
    type: "object"
    properties:
      DeptID:
        type: "number"
        format: "integer"
      Name:
        type: "string"
        format: "alphanumeric"
      ExecSponsor:
        type: "string"
        format: "alphanumeric"
      SDM:
        type: "string"
        format: "ServiceDeliveryManager"
      Classification:
        type: "string"
        format: "alphanumeric"
      DeptColor:
        type: "number"
        format: "HexadecimalColor"
  Device:
    type: "object"
    properties:
      DeviceID:
        type: "number"
        format: "integer"
      Label:
        type: "string"
        format: "string"
      SerialNo:
        type: "string"
        format: "string"
      AssetTag:
        type: "string"
        format: "string"
      PrimaryIP:
        type: "string"
        format: "string"
      SNMPVersion:
        type: "string"
        enum:
        - "1"
        - "2c"
        - "3"
      v3SecurityLevel:
        type: "string"
        format: "string"
      v3AuthProtocol:
        type: "string"
        format: "string"
      v3Passphrase:
        type: "string"
        format: "string"
      v3PrivProtocol:
        type: "string"
        format: "string"
      SNMPCommunity:
        type: "string"
        format: "string"
      SNMPFailureCount:
        type: "integer"
        format: "integer"
      Hypervisor:
        type: "string"
        enum:
        - "ESX"
        - "ProxMox"
        - "None"
      APIUserName:
        type: "string"
        format: "string"
      APIPassword:
        type: "string"
        format: "password"
      APIPort:
        type: "integer"
        format: "integer"
      ProxMoxRealm:
        type: "string"
        format: "string"
      Owner:
        type: "integer"
        format: "keyValue for Department that owns the device"
      EscalationTimeID:
        type: "integer"
        format: "keyValue"
      EscalationID:
        type: "integer"
        format: "keyValue"
      PrimaryContact:
        type: "integer"
        format: "keyValue"
      Cabinet:
        type: "integer"
        format: "keyValue"
      Position:
        type: "integer"
        format: "integer"
      Height:
        type: "integer"
        format: "integer"
      Ports:
        type: "integer"
        format: "integer"
      FirstPortNum:
        type: "integer"
        format: "integer"
      TemplateID:
        type: "integer"
        format: "keyValue"
      NominalWatts:
        type: "integer"
        format: "integer"
      PowerSupplyCount:
        type: "integer"
        format: "integer"
      DeviceType:
        type: "string"
        enum:
        - 'Server'
        - 'Appliance'
        - 'Storage Array'
        - 'Switch'
        - 'Chassis'
        - 'Patch Panel'
        - 'Physical Infrastructure'
        - 'CDU'
        - 'Sensor'
      ChassisSlots:
        type: "integer"
        format: "integer"
      RearChassisSlots:
        type: "integer"
        format: "integer"
      ParentDevice:
        type: "integer"
        format: "keyValue"
      MfgDate:
        type: "string"
        format: "string"
      InstallDate:
        type: "string"
        format: "string"
      WarrantyCo:
        type: "string"
        format: "string"
      WarrantyExpire:
        type: "string"
        format: "string"
      Notes:
        type: "string"
        format: "string"
      Status:
        type: "string"
        format: "string"
      HalfDepth:
        type: "boolean"
        format: "boolean"
      BackSide:
        type: "boolean"
        format: "boolean"
      AuditStamp:
        type: "string"
        format: "string"
      Weight:
        type: "integer"
        format: "integer"          
  DeviceTemplate:
    type: "object"
    properties:
      TemplateID:
        type: "integer"
        format: "keyValue for Template"
      ManufacturerID:
        type: "integer"
        format: "keyValue for the Manufacturer"
      Model:
        type: "string"
        format: "Freeform text"
      Height:
        type: "integer"
        format: "Height in rack units"
      Weight:
        type: "integer"
        format: "Weight, in localized units, of a device of this type"
      Wattage:
        type: "integer"
        format: "Wattage to use in capacity calculations"
      DeviceType:
        type: "string"
        enum:
        - 'Server'
        - 'Appliance'
        - 'Storage Array'
        - 'Switch'
        - 'Chassis'
        - 'Patch Panel'
        - 'Physical Infrastructure'
        - 'CDU'
        - 'Sensor'
      PSCount:
        type: "integer"
        format: "Number of power inputs"
      NumPorts:
        type: "integer"
        format: "Number of data ports"
      Notes:
        type: "string"
        format: "Freeform text"
      FrontPictureFile:
        type: "string"
        format: "Relative path to the image file for the front"
      RearPictureFile:
        type: "string"
        format: "Relative path to the image file for the rear"
      ChassisSlots:
        type: "integer"
        format: "Number of front slots (if a chassis)"
      RearChassisSlots:
        type: "integer"
        format: "Number of rear slots (if a chassis)"
      SNMPVersion:
        type: "string"
        enum:
        - "1"
        - "2c"
        - "3"
      GlobalID:
        type: "integer"
        format: "If pulled from online repo, the corresponding keyValue for repository record"
      Managed:
        type: "boolean"
        format: "(CDU) If this is a managed device"
      ATS:
        type: "boolean"
        format: "(CDU) If this device is an Auto-Transfer Switch"
      VersionOID:
        type: "string"
        format: (CDU) OID for version number"
      OutletNameOID:
        type: "string"
        format: "(CDU) OID for traversing outlet names"
      OutletDescOID:
        type: "string"
        format: "(CDU) OID for traversing outlet descriptions"
      OutletCountOID:
        type: "string"
        format: "(CDU) OID for number of power output outlets"
      OutletStatusOID:
        type: "string"
        format: "(CDU) OID for traversing outlet status"
      OutletStatusOn:
        type: "string"
        format: "(CDU) Value returned for an outlet that has been turned on"
      Multiplier:
        type: "number"
        format: "(CDU) A multiplier to be applied to the result from a Wattage/Amperage query to get into whole units"
      OID1:
        type: "string"
        format: "(CDU) OID for the first phase (or section) power usage"
      OID2:
        type: "string"
        format: "(CDU) OID for the second phase (or section) power usage"
      OID3:
        type: "string"
        format: "(CDU) OID for the third phase (or section) power usage"
      ATSStatusOID:
        type: "string"
        format: "(CDU) OID to query for ATS Status"
      ATSDesiredResult:
        type: "string"
        format: "(CDU) Result from a query of the ATS Status OID that indicates normal operation"
      ProcessingProfile:
        type: "string"
        enum:
        - 'SingleOIDWatts'
        - 'SingleOIDAmperes'
        - 'Combine3OIDWatts'
        - 'Combine3OIDAmperes'
        - 'Convert3PhAmperes'
      Voltage:
        type: "integer"
        format: "(CDU) Input voltage"
      Amperage:
        type: "integer"
        format: "(CDU) Input circuit amperage"
      NumOutlets:
        type: "integer"
        format: "(CDU) Number of outlets for output"
  DevicePort:
    type: "object"
    properties:
      DeviceID:
        type: "number"
        format: "keyValue of DeviceID"
      PortNumber:
        type: "number"
        format: "Integer value of port number.  Negative numbers indicate rear side ports for patch panels."
      Label:
        type: "string"
        format: "Human friendly label for the port"
      MediaID:
        type: "number"
        format: "keyValue of MediaType"
      ColorID:
        type: "number"
        format: "keyValue of ColorCode"
      ConnectedDeviceID:
        type: "number"
        format: "keyValue of device at opposite end of connection"
      ConnectedPort:
        type: "number"
        format: "Port number of associated device at opposite end of connection"
      Notes:
        type: "string"
        format: "Freeform text"
  Disposition:
    type: "object"
    properties:
      DispositionID:
        type: "integer"
        format: "integer"
      Name:
        type: "string"
        format: "string"
      Description:
        type: "string"
        format: "string"
      ReferenceNumber:
        type: "string"
        format: "string"
      Status:
        type: "string"
        enum:
        - "Active"
        - "Inactive"
  PDUStats:
    type: "object"
    properties:
      PDUID:
        type: "integer"
        format: "integer"
      Wattage:
        type: "integer"
        format: "integer"
      LastRead:
        type: "string"
        format: "Timestamp of last reading"
  Person:
    type: "object"
    properties:
      PersonID:
        type: "number"
        format: "integer"
      UserID:
        type: "string"
        format: "alphanumeric"
      LastName:
        type: "string"
        format: "alphanumeric"
      FirstName:
        type: "string"
        format: "alphanumeric"
      Phone1:
        type: "string"
        format: "PhoneNumber"
      Phone2:
        type: "string"
        format: "PhoneNumber"
      Phone3:
        type: "string"
        format: "PhoneNumber"
      Email:
        type: "string"
        format: "EmailAddress"
      AdminOwnDevices:
        type: boolean
        format: "User has ability to administer their own devices"
      ReadAccess:
        type: boolean
        format: "User has global read rights"
      WriteAccess:
        type: boolean
        format: "User has global write rights"
      DeleteAccess:
        type: boolean
        format: "User has global delete access"
      ContactAdmin:
        type: boolean
        format: "User is a Contact Administrator"
      RackRequest:
        type: boolean
        format: "User has rights to enter Rack Requests"
      RackAdmin:
        type: boolean
        format: "User has rights to complete rack requests"
      BulkOperations:
        type: boolean
        format: "User has rights to perform Bulk Operations"
      SiteAdmin:
        type: boolean
        format: "User is a site administrator"
      APIKey:
        type: string
        format: "API Token"
      Disabled:
        type: boolean
        format: "User has been disabled"
  Project:
    type: "object"
    properties:
      ProjectID:
        type: "integer"
        format: "keyValue"
      ProjectName:
        type: "string"
        format: "Freeform text"
      ProjectSponsor:
        type: "string"
        format: "Freeform text"
      ProjectStartDate:
        type: "string"
        format: "Datestamp"
      ProjectEndDate:
        type: "string"
        format: "Datestamp"
      ProjectActualEndDate:
        type: "string"
        format: "Datestamp"
  PowerPort:
    type: "object"
    properties:
      DeviceID:
        type: "integer"
        format: "keyValue"
      PortNumber:
        type: "integer"
        format: "integer"
      Label:
        type: "string"
        format: "Human friendly label for the port"
      ConnectedDeviceID:
        type: "integer"
        format: "keyValue DeviceID for the connected device"
      ConnectedPort:
        type: "integer"
        format: "keyValue port number for the connected device"
      Notes:
        type: "string"
        format: "Freeform text"
  SensorReading:
    type: "object"
    properties:
      DeviceID:
        type: "integer"
        format: "keyValue"
      Temperature:
        type: "number"
        format: "Temperature in localized units"
      Humidity:
        type: "integer"
        format: "Humidity"
      LastRead:
        type: "string"
        format: "Timestamp of last reading"
securityDefinitions:
  api_key:
    type: "apiKey"
    name: "APIKey"
    in: "header"
  user_id:
    type: "apiKey"
    name: "UserID"
    in: "header"
