Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a79953c
feature_managementhdd
alex001x May 5, 2025
78e0f06
feature_managementhdd
alex001x May 7, 2025
0b5beac
feature_managementhdd
alex001x May 7, 2025
32deb20
feature_managementhdd
alex001x May 7, 2025
39724d9
feature_managementhdd
alex001x May 8, 2025
2e1a528
feature_managementhdd
alex001x May 8, 2025
31874d5
feature_managementhdd
alex001x May 13, 2025
ad70bf4
feature_managementhdd
alex001x May 13, 2025
f486f23
feature_managementhdd
alex001x May 16, 2025
e8a341f
feature_managementhdd
alex001x May 16, 2025
17502d4
feature_managementhdd
alex001x May 19, 2025
8b61e32
feature_managementhdd
alex001x May 20, 2025
ed862d8
feature_managementhdd
alex001x May 20, 2025
560eb05
feature_managementhdd
alex001x May 22, 2025
43115eb
Merge branch 'opendcim:master' into feature/management_hdd
alex001x May 22, 2025
28a6a13
feature_managementhdd
alex001x May 22, 2025
1b584ab
feature_managementhdd
alex001x May 22, 2025
9baaadc
feature_managementhdd
alex001x May 23, 2025
c6dad3c
feat(report_hdd): sauvegarde des modifs avant création de la nouvelle…
alex001x Sep 19, 2025
0aa801d
Update db-23.04-to-24.01.sql
alex001x Nov 10, 2025
ed2cc3a
Update db-23.04-to-24.01.sql
alex001x Nov 10, 2025
f67a0d9
Merge branch 'feature/management_hdd' of https://github.com/alex001x/…
alex001x Nov 24, 2025
343fefc
Add HDD CSV automation and logging features
alex001x Nov 27, 2025
3337b5f
readme feat Manage HDD
alex001x Nov 27, 2025
257d9b0
feat: enhance HDD management UI and logging
alex001x Dec 1, 2025
71289dd
feat: expose HDD REST endpoints and doc updates
alex001x Dec 1, 2025
675a23e
docs: add HDD API section
alex001x Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
303 changes: 262 additions & 41 deletions api/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ info:
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"
tags:
- name: "openDCIM"
description: "Everything about your Data Center Inventory."
externalDocs:
description: "Find out more"
url: "http://wiki.opendcim.org"
- name: "HDD"
description: "HDD inventory endpoints."
paths:
/audit:
get:
summary: Audit history for the requested device
tags:
- "AuditLogs"
/audit:
get:
summary: Audit history for the requested device
tags:
- "AuditLogs"
description: ''
produces:
- "application/json"
Expand Down Expand Up @@ -86,12 +88,166 @@ paths:
type: "array"
items:
$ref: "#/definitions/Audit"
security:
- api_key: []
- user_id: []
/cabinet:
get:
summary: Information about one or more cabinets
security:
- api_key: []
- user_id: []
/hdd:
get:
summary: "List HDD entries"
tags:
- "HDD"
description: "Requires ManageHDD or SiteAdmin."
produces:
- "application/json"
operationId: "GetHdd"
parameters:
- name: DeviceID
in: query
required: false
type: integer
format: "DeviceID filter"
- name: HDDID
in: query
required: false
type: string
description: "Single HDDID or comma separated list."
- name: Status
in: query
required: false
type: string
description: "Status filter (single value or comma separated list)."
- name: SerialNo
in: query
required: false
type: string
description: "Partial serial number match."
responses:
"401":
description: "Access denied."
"200":
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/HDD"
security:
- api_key: []
- user_id: []
put:
summary: "Create HDD entry"
tags:
- "HDD"
consumes:
- "application/json"
- "application/x-www-form-urlencoded"
produces:
- "application/json"
description: "Creates an HDD entry. DeviceID and SerialNo are required; ProofFile is read-only."
operationId: "PutHdd"
parameters:
- in: body
name: body
description: "New HDD payload."
required: true
schema:
$ref: "#/definitions/HDD"
responses:
"401":
description: "Access denied."
"200":
description: "successful operation"
schema:
$ref: "#/definitions/HDD"
security:
- api_key: []
- user_id: []
/hdd/{hddid}:
get:
summary: "Get HDD entry"
tags:
- "HDD"
produces:
- "application/json"
operationId: "GetHddById"
parameters:
- name: hddid
in: path
required: true
type: integer
format: "HDDID"
responses:
"401":
description: "Access denied."
"404":
description: "HDD not found."
"200":
description: "successful operation"
schema:
$ref: "#/definitions/HDD"
security:
- api_key: []
- user_id: []
post:
summary: "Update HDD entry"
tags:
- "HDD"
consumes:
- "application/json"
- "application/x-www-form-urlencoded"
produces:
- "application/json"
description: "Updates SerialNo, Size, TypeMedia, Status, or DeviceID for the specified HDD. ProofFile cannot be modified via the API."
operationId: "PostHdd"
parameters:
- name: hddid
in: path
required: true
type: integer
- in: body
name: body
required: true
schema:
$ref: "#/definitions/HDD"
responses:
"401":
description: "Access denied."
"404":
description: "HDD not found."
"200":
description: "successful operation"
schema:
$ref: "#/definitions/HDD"
security:
- api_key: []
- user_id: []
/hdd/{hddid}/proof:
get:
summary: "Retrieve destruction proof metadata"
tags:
- "HDD"
produces:
- "application/json"
operationId: "GetHddProof"
parameters:
- name: hddid
in: path
required: true
type: integer
responses:
"401":
description: "Access denied."
"404":
description: "Proof not available."
"200":
description: "successful operation"
schema:
$ref: "#/definitions/HDDProof"
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.'
Expand Down Expand Up @@ -1412,12 +1568,18 @@ definitions:
PSCount:
type: "integer"
format: "Number of power inputs"
NumPorts:
type: "integer"
format: "Number of data ports"
Notes:
type: "string"
format: "Freeform text"
NumPorts:
type: "integer"
format: "Number of data ports"
EnableHDDFeature:
type: "integer"
format: "1 when the HDD management feature is enabled"
HDDCount:
type: "integer"
format: "Maximum HDD slots supported by this template"
Notes:
type: "string"
format: "Freeform text"
FrontPictureFile:
type: "string"
format: "Relative path to the image file for the front"
Expand Down Expand Up @@ -1605,12 +1767,15 @@ definitions:
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"
BulkOperations:
type: boolean
format: "User has rights to perform Bulk Operations"
ManageHDD:
type: boolean
format: "User has rights to manage HDD inventory"
SiteAdmin:
type: boolean
format: "User is a site administrator"
APIKey:
type: string
format: "API Token"
Expand Down Expand Up @@ -1659,24 +1824,80 @@ definitions:
Notes:
type: "string"
format: "Freeform text"
SensorReading:
type: "object"
properties:
DeviceID:
type: "integer"
format: "keyValue"
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"
LastRead:
type: "string"
format: "Timestamp of last reading"
HDD:
type: "object"
properties:
HDDID:
type: "integer"
format: "keyValue"
DeviceID:
type: "integer"
format: "keyValue"
SerialNo:
type: "string"
format: "Serial number"
Status:
type: "string"
enum:
- "On"
- "Off"
- "Pending_destruction"
- "Destroyed"
- "Spare"
TypeMedia:
type: "string"
format: "Media type"
Size:
type: "integer"
format: "Capacity in GB"
DateAdd:
type: "string"
format: "Timestamp"
DateWithdrawn:
type: "string"
format: "Timestamp"
DateDestroyed:
type: "string"
format: "Timestamp"
ProofFile:
type: "string"
format: "Stored proof reference"
HDDProof:
type: "object"
properties:
HDDID:
type: "integer"
SerialNo:
type: "string"
ProofFile:
type: "string"
public_url:
type: "string"
format: "URL"
filesystem_path:
type: "string"
format: "Filesystem path when accessible"
file_exists:
type: "boolean"
format: "Indicates if the file is present on disk"
securityDefinitions:
api_key:
type: "apiKey"
name: "APIKey"
in: "header"
user_id:
Expand Down
Loading