Skip to content

Device Profiles Module

Overview

Swagger-driven developer documentation for device profile endpoints and contracts.

Key APIs

MethodPathSummary
GET/api/device-profilesList device profiles
POST/api/device-profilesCreate device profile
DELETE/api/device-profiles/{profileId}Delete device profile
GET/api/device-profiles/{profileId}Get device profile details
PUT/api/device-profiles/{profileId}Update device profile
GET/api/device-profiles/ensure-defaultEnsure default device profile exists

Frontend Usage Flow

  • Frontend list pages call collection GET endpoints to load tables or summary views.
  • Detail pages call parameterized GET endpoints to load a single resource before rendering tabs, forms, or detail sections.
  • Create forms submit payloads to POST endpoints and then refresh the list or navigate to the created resource.
  • Edit flows load existing values, submit to PUT or PATCH endpoints, and then refresh the visible state.
  • Delete actions call DELETE endpoints and then refresh collection state.

GET /api/device-profiles

Summary: List device profiles

Operation ID: DeviceProfilesController_findAll

Tags: Device Profiles

Security:

  • bearer

Responses

200

Device profiles returned successfully

Content-Type: application/json

Schema:

json
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/DeviceProfileResponseDto"
  }
}

Example:

json
[
  {
    "profileId": "default-profile",
    "name": "Temperature Sensor Profile",
    "type": "temperature-sensor",
    "description": "Default profile for temperature sensors",
    "isDefault": true,
    "createdAt": "2026-04-07T04:30:00.000Z",
    "updatedAt": "2026-04-07T04:45:00.000Z"
  }
]

401

Unauthorized

No response body.

Notes / Constraints

  • Swagger declares security requirements for this operation.

POST /api/device-profiles

Summary: Create device profile

Operation ID: DeviceProfilesController_create

Tags: Device Profiles

Security:

  • bearer

Request

Content-Type: application/json

Schema:

json
{
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Display name of the device profile"
    },
    "type": {
      "type": "string",
      "description": "Optional device type associated with the profile"
    },
    "description": {
      "type": "string",
      "description": "Optional description"
    },
    "transport": {
      "type": "object",
      "description": "Supported transports for this profile"
    },
    "alarms": {
      "type": "object",
      "description": "Alarm configuration payload"
    }
  }
}

Example:

json
{
  "name": "Temperature Sensor Profile",
  "type": "temperature-sensor",
  "description": "Default profile for temperature sensors",
  "transport": [
    "HTTPS",
    "MQTT"
  ],
  "alarms": [
    {
      "key": "temperature_high",
      "severity": "MAJOR",
      "threshold": 80
    }
  ]
}

Responses

201

Device profile created successfully

Content-Type: application/json

Schema:

json
{
  "type": "object",
  "required": [
    "profileId",
    "name"
  ],
  "properties": {
    "profileId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "isDefault": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  }
}

Example:

json
{
  "profileId": "default-profile",
  "name": "Temperature Sensor Profile",
  "type": "temperature-sensor",
  "description": "Default profile for temperature sensors",
  "isDefault": true,
  "createdAt": "2026-04-07T04:30:00.000Z",
  "updatedAt": "2026-04-07T04:45:00.000Z"
}

400

Invalid device profile payload

No response body.

401

Unauthorized

No response body.

403

Read-only users cannot modify device profiles

No response body.

Notes / Constraints

  • Supported request content types: application/json.
  • Swagger declares security requirements for this operation.

DELETE /api/device-profiles/{profileId}

Summary: Delete device profile

Operation ID: DeviceProfilesController_remove

Tags: Device Profiles

Security:

  • bearer

Parameters

NameInRequiredTypeDescription
profileIdpathyesstringDevice profile identifier

Responses

200

Device profile deleted successfully

Content-Type: application/json

Schema:

json
{
  "type": "object",
  "required": [
    "success"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    }
  }
}

Example:

json
{
  "success": true
}

401

Unauthorized

No response body.

403

Read-only users cannot modify device profiles

No response body.

Notes / Constraints

  • This endpoint depends on one or more path parameters.
  • Swagger declares security requirements for this operation.

GET /api/device-profiles/{profileId}

Summary: Get device profile details

Operation ID: DeviceProfilesController_findOne

Tags: Device Profiles

Security:

  • bearer

Parameters

NameInRequiredTypeDescription
profileIdpathyesstringDevice profile identifier

Responses

200

Device profile returned successfully

Content-Type: application/json

Schema:

json
{
  "type": "object",
  "required": [
    "profileId",
    "name"
  ],
  "properties": {
    "profileId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "isDefault": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  }
}

Example:

json
{
  "profileId": "default-profile",
  "name": "Temperature Sensor Profile",
  "type": "temperature-sensor",
  "description": "Default profile for temperature sensors",
  "isDefault": true,
  "createdAt": "2026-04-07T04:30:00.000Z",
  "updatedAt": "2026-04-07T04:45:00.000Z"
}

401

Unauthorized

No response body.

Notes / Constraints

  • This endpoint depends on one or more path parameters.
  • Swagger declares security requirements for this operation.

PUT /api/device-profiles/{profileId}

Summary: Update device profile

Operation ID: DeviceProfilesController_update

Tags: Device Profiles

Security:

  • bearer

Parameters

NameInRequiredTypeDescription
profileIdpathyesstringDevice profile identifier

Request

Content-Type: application/json

Schema:

json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Updated display name"
    },
    "type": {
      "type": "string",
      "description": "Updated device type"
    },
    "description": {
      "type": "string",
      "description": "Updated description"
    },
    "transport": {
      "type": "object",
      "description": "Supported transports for this profile"
    },
    "alarms": {
      "type": "object",
      "description": "Alarm configuration payload"
    }
  }
}

Example:

json
{
  "name": "Temperature Sensor Profile",
  "type": "temperature-sensor",
  "description": "Updated profile description",
  "transport": [
    "HTTPS",
    "MQTT"
  ],
  "alarms": [
    {
      "key": "temperature_high",
      "severity": "MAJOR",
      "threshold": 80
    }
  ]
}

Responses

200

Device profile updated successfully

Content-Type: application/json

Schema:

json
{
  "type": "object",
  "required": [
    "profileId",
    "name"
  ],
  "properties": {
    "profileId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "isDefault": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  }
}

Example:

json
{
  "profileId": "default-profile",
  "name": "Temperature Sensor Profile",
  "type": "temperature-sensor",
  "description": "Default profile for temperature sensors",
  "isDefault": true,
  "createdAt": "2026-04-07T04:30:00.000Z",
  "updatedAt": "2026-04-07T04:45:00.000Z"
}

400

Invalid device profile payload

No response body.

401

Unauthorized

No response body.

403

Read-only users cannot modify device profiles

No response body.

Notes / Constraints

  • This endpoint depends on one or more path parameters.
  • Supported request content types: application/json.
  • Swagger declares security requirements for this operation.

GET /api/device-profiles/ensure-default

Summary: Ensure default device profile exists

Operation ID: DeviceProfilesController_ensureDefault

Tags: Device Profiles

Security:

  • bearer

Responses

200

Default device profile ensured

Content-Type: application/json

Schema:

json
{
  "type": "object",
  "required": [
    "profileId",
    "name"
  ],
  "properties": {
    "profileId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "isDefault": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  }
}

Example:

json
{
  "profileId": "default-profile",
  "name": "Temperature Sensor Profile",
  "type": "temperature-sensor",
  "description": "Default profile for temperature sensors",
  "isDefault": true,
  "createdAt": "2026-04-07T04:30:00.000Z",
  "updatedAt": "2026-04-07T04:45:00.000Z"
}

401

Unauthorized

No response body.

403

Read-only users cannot modify device profiles

No response body.

Notes / Constraints

  • Swagger declares security requirements for this operation.

Module Notes / Constraints

  • Generated from OpenAPI version metadata: 1.0.
  • 6 operation(s) in this module declare explicit Swagger security requirements.
  • HTTP methods present in this module: GET, POST, DELETE, PUT.
  • This file is generated from Swagger/OpenAPI and should be regenerated when controller, DTO, or Swagger decorator changes affect the spec.

support@autoconnecto.in · founder@autoconnecto.in · +91 92121 00555 · app.autoconnecto.in