Extend hawkBit Documentation (#2920)

This commit is contained in:
Desislava Marinova
2026-02-23 14:47:30 +02:00
committed by GitHub
parent 30fd475b57
commit a82f4cc9f6
12 changed files with 1270 additions and 112 deletions

View File

@@ -3,43 +3,48 @@
Eclipse hawkBit™ is a domain independent back-end framework for rolling out software updates to constrained edge devices as well as more powerful controllers and gateways connected to IP based networking infrastructure.
<p align="center">
<img src="images/hawkBit_overview.png" alt="eclipse foundation logo" width="1200">
<img src="images/hawkBit_overview.jpeg" alt="Eclipse hawkBit Overview" width="1200">
</p>
---
## Interfaces
hawkBit offers a direct device integration via HTTP or a device management federation API which allows to connect devices with different protocol adapter. Users can make use of the graphical user interface and other service can interact with hawkBit through the RESTful management API.
Eclipse hawkBit™ provides three APIs, each designed to support specific integration requirements for device connectivity, device management, and external service federation.
### Management API
The Management API is a RESTful interface that allows Create, Read, Update, and Delete (CRUD) operations for provisioning targets (e.g., devices) and repository content (e.g., software). Using the Management API, you can manage and monitor software update processes. It supports JSON payloads with Hypermedia and offers filtering, sorting, and pagination capabilities
The following sections provide a high-level overview. For in-depth information, including request flows and examples, see the [Management API documentation](#management-api)
### Direct Device Integration (DDI) API
The Direct Device Integration (DDI) API is built on HTTP standards and uses a polling-based approach.
Eclipse hawkBit™ exposes RESTful resources that devices consume to retrieve software update tasks, including artifact partial and resume downloads (RFC7233), and to report back status and feedback.
The DDI API supports ETag-based traffic optimization, allowing devices to efficiently check for updates without unnecessary data transfer.
Learn more in the [DDI API documentation](direct-device-integration-api.md)
### Device Management Federation (DMF) API
The Device Management Federation (DMF) API enables indirect device integration via a device management service into hawkBit. It is a message-based, asynchronous API optimized for high-throughput cloud service-to-service communication. The DMF API leverages RabbitMQ messaging and provides strong tenant isolation through dedicated AMQP virtual hosts per tenant.
For a detailed description and usage examples, see the [Device Management Federation (DMF) API documentation](device-management-federation-api.md)
---
## Rollout
## Device Repository
<div style="display: flex; align-items: flex-start;">
<div style="flex: 1; padding-right: 20px;">
hawkBit supports an easy and flexible rollout management which allows you to update a large amount of devices in separated groups.
- Cascading start of the deployment groups based on installation status of the previous group.
- Emergency shutdown of the rollout in case a group exceeds the defined error threshold.
- Rollout progress monitoring for the entire rollout and the individual groups.
</div>
<div style="flex: 1;">
<img src="images/rollout.png" alt="Rollout Diagram" width="700"/>
</div>
</div>
---
## Package Model
- **Device State Storage**: The Device Repository manages connected devices (targets) and their state. It allows you to retrieve device details and attributes, maintain descriptions, metadata, tags, and track assigned and installed software versions, including software update status.
- **Tagging**: hawkBit™ allows creating and managing arbitrary tags that can be assigned to devices. These tags become part of the target metadata and can be used as a simple, flexible way to filter and group devices in both the UI and API
- **Filtering and Grouping**: Advanced device management is enabled through Target Filters, which group devices based on query criteria. These filters not only simplify device organization but also support automatic update assignments - for example, newly registered devices that match a filter are automatically assigned the corresponding software update.
## Software Repository
#### Distribution Sets and Software Modules
The software repository organizes and manages software updates. A software update, called a Distribution Set, is composed of one or more Software Modules, each containing multiple artifacts.
<div style="display: flex; align-items: flex-start;">
<div style="flex: 1;">
@@ -50,9 +55,78 @@ hawkBit supports an easy and flexible rollout management which allows you to upd
<div style="flex: 1; padding-left: 20px;">
A software update does not always contain only a single file.
The hawkBit meta model allows you to configure your files in virtual software and distribution packages.
**Structure**:
- **Distribution Set**: Complete software package for deployment
- Version controlled
- Can contain multiple software modules
- Distribution set types (OS, Application, Firmware, etc.)
- **Software Module**: Individual software component
- Contains one or more artifacts (files)
- Software module types (customizable)
- Mandatory vs. optional designation
- **Artifact**: Binary files with metadata
- Multiple hash algorithms (MD5, SHA1, SHA256)
- Encryption support
- Signature support
</div>
</div>
Metadata can be assigned to both Software Modules and Distribution Sets.
#### Tagging and Filtering
hawkBit™ lets you assign userdefined tags to Distribution Sets and then filter Distribution Sets using those tags, making it easier to organize and locate updates based on custom criteria.
#### Locking After Assignment
To ensure consistency and prevent unintended changes, hawkBit™ supports locking of Distribution Sets after they have been assigned to a target (device or group). When a distribution set is locked, all its software modules are automatically locked, and they cannot be modified until they are unlocked. This provides stability for ongoing deployments, ensuring that the software being rolled out remains consistent throughout the deployment process.
#### Required Migration Step Flag
When creating a Distribution Set, you can set a flag to indicate that applying this update requires a migration step on the device. This is useful for ensuring data migration, configuration changes, or other necessary steps are performed during the update process to ensure a successful transition.
## Artifact Content Delivery
The Artifact Content Delivery component manages the storage and delivery of software artifacts to devices. It supports partial and resumable downloads using RFC7233 range requests, allowing devices to efficiently retrieve large files even in unreliable network conditions. The content management is accessible via RESTful APIs and the UI, with authorization based on software assignment to ensure that devices can only download artifacts they are authorized for.
## Rollout Management
Rollout Management in Eclipse hawkBit™ is a core feature designed to orchestrate and control the deployment of software updates to large fleets of devices in a safe, flexible, and automated way.
It enables group-based deployments with configurable success and error thresholds. Groups can cascade based on the status of previous groups.
<img src="images/rollout_groups.png" alt="Rollout Diagram" width="700"/>
The traditional “big bang” approach updates all devices at once, creating a sharp load spike and risking infrastructure overload, while hawkBits phased rollout spreads updates across smaller groups over time, smoothing load and maintaining system stability.
<img src="images/rollout_load.png" alt="Rollout Diagram" width="400"/>
Rollouts can be started, paused, resumed, stopped, or retried, with real-time monitoring and emergency stop features.
Devices can be added dynamically, and detailed status tracking is available for each rollout stage.
To explore software update in greater detail, visit [Rollout Management documentation](rollout-management.md)
## Reporting and Monitoring
Eclipse hawkBit™ provides real-time visibility and historical insight into how software updates are rolled out, executed, and completed across large device fleets. Reporting and monitoring are tightly coupled to its rollout and device management model.
#### Monitoring Features
- **Rollout Progress Tracking**: Monitor deployment stages, group completion, and cascading group triggers
- **Action States**: Track individual device update actions (pending, running, finished, error, canceled)
- **Action History**: Monitor the status of every device via its action history. This action history makes transparent which action happened at which particular time and with its result.
- **Success/Error Thresholds**: Configure and monitor threshold violations that can pause or stop rollouts
- **Device Connectivity**: Track device polling activity, last seen timestamps, and overdue detection
- **Download Progress**: Monitor artifact download status and completion rates
#### Reporting Channels
- **Management API**: RESTful endpoints for querying device status, action history, and rollout metrics
- **Event System**: Publish events for entity changes, action status updates, target polling, and download progress
- **RabbitMQ Events**: Remote events for distributed monitoring and integration with external tools
## Authentication & Security
Eclipse hawkBit™ provides comprehensive authentication and security features to protect devices, management interfaces, and data. All communication is protected using TLS/HTTPS, and update delivery is restricted to authenticated devices. hawkBit also records deployment and action history for traceability and auditing. While it keeps built-in security mechanisms focused and lightweight, hawkBit is designed to integrate easily with external identity, logging, and security systems for production use.
If youd like to explore security controls in more detail, check out the [Authentication](authentication.md) and [Authorization](authorization.md) documentation.

View File

@@ -1,9 +1,9 @@
- Getting Started
- [Overview](README.md)
- Introduction
- [What is hawkBit](what-is-hawkbit.md)
- [Overview](README.md)
- Getting Started
- [Quick Start](quick-start.md)
- [Features](features.md)
- [Architecture](architecture.md)
- [Device Provisioning](device-provisioning.md)
- Guides
- [Base Setup](base-setup.md)
@@ -12,11 +12,13 @@
- [Clustering](clustering.md)
- Concepts
- [Architecture](architecture.md)
- [Authentication](authentication.md)
- [Authorization](authorization.md)
- [Data model](datamodel.md)
- [Rollout management](rollout-management.md)
- [Targets state](targetstate.md)
- [Entity definitions](entity-definitions.md)
- APIs
- [Management API](management-api.md)

505
docs/device-provisioning.md Normal file
View File

@@ -0,0 +1,505 @@
# Device Provisioning
Device provisioning is the process of registering a device with the hawkBit update server so it can receive software updates. hawkBit supports two main provisioning scenarios:
- **Provisioning and Registration via Management API**: An administrator or backend system register devices in hawkBit before they connect by providing device identification and description. This approach provides centralized control and is ideal for pre-planned deployments.
- **Direct Registration via DDI API**: Devices register themselves automatically when they first connect to hawkBit. This is called auto-registration and is ideal for dynamic environments.
## Provisioning and Registration via Management API
In this scenario, an administrator or backend system first provision the device using the Management UI or the [Management API](management-api.md). This is the step where the device identification and description is provided.
### When to Use
- Devices are provisioned during manufacturing or warehouse setup
- You need to assign software updates before devices are deployed
- You require strict inventory control
- You want to pre-configure security tokens
- Bulk provisioning of many devices
### Prerequisites
- Management API access with appropriate permissions:
- `CREATE_TARGET` - to create targets
- `UPDATE_TARGET` - to modify targets
- `READ_TARGET` - to view targets
- Valid credentials (username/password) for Basic Authentication
- Target Security Token authentication enabled on the server - see [Configuration Properties](#configuration-properties) below
### Workflow
```mermaid
%%{init: {'theme':'base', 'themeVariables': {
'primaryColor':'#6BAF4A',
'primaryTextColor':'#000',
'primaryBorderColor':'#6BAF4A',
'lineColor':'#4A2C5C',
'secondaryColor':'#E8D5F2',
'tertiaryColor':'#6BAF4A',
'noteBkgColor':'#F5F5F5',
'noteTextColor':'#000',
'noteBorderColor':'#6BAF4A',
'actorBorder':'#4A2C5C',
'actorBkg':'#6BAF4A',
'actorTextColor':'#000',
'actorLineColor':'#4A2C5C',
'signalColor':'#4A2C5C',
'signalTextColor':'#000',
'labelBoxBkgColor':'#E8D5F2',
'labelBoxBorderColor':'#6BAF4A',
'labelTextColor':'#000',
'loopTextColor':'#000',
'activationBorderColor':'#4A2C5C',
'activationBkgColor':'#F5F5F5',
'sequenceNumberColor':'#FFF'
}}}%%
sequenceDiagram
participant Admin as Admin/Backend System
participant MgmtAPI as Management API<br/>(REST)
participant Server as hawkBit Server
participant DDIAPI as DDI API<br/>(REST)
participant Device as Device
Note over Admin,Device: Phase 1: Provisioning (Before Device Deployment)
Admin->>MgmtAPI: POST /rest/v1/targets
Note right of Admin: Create device with:<br/>- controllerId<br/>- name, description<br/>- securityToken (optional)<br/>- requestAttributes
activate MgmtAPI
MgmtAPI->>Server: Create Target Entity
activate Server
Server->>Server: Generate securityToken<br/>(if not provided)
Server->>Server: Set updateStatus:<br/>"registered"
Server-->>MgmtAPI: 201 Created
deactivate Server
MgmtAPI-->>Admin: Target created with<br/>securityToken
deactivate MgmtAPI
Note over Admin,Device: Phase 2: Device Registration (First Connection)
Device->>DDIAPI: GET /{tenant}/controller/v1/{controllerId}
Note right of DDIAPI: Authorization:<br/>TargetToken {securityToken}
activate DDIAPI
DDIAPI->>Server: Authenticate & Retrieve Target
activate Server
Server->>Server: Validate securityToken<br/>Update lastControllerRequestAt
Server-->>DDIAPI: Target Configuration
deactivate Server
DDIAPI-->>Device: 200 OK<br/>Polling interval + links
deactivate DDIAPI
Note left of Device: config.polling.sleep<br/>_links.configData
Note over Admin,Device: Phase 3: Add Device Attributes (Optional)
Device->>DDIAPI: PUT /{tenant}/controller/v1/{controllerId}/configData
Note right of DDIAPI: Send attributes:<br/>- hwRevision<br/>- VIN<br/>- OS version<br/>mode: "merge"
activate DDIAPI
DDIAPI->>Server: Update Target Attributes
activate Server
Server->>Server: Merge/Replace/Remove<br/>attributes
Server-->>DDIAPI: 200 OK
deactivate Server
DDIAPI-->>Device: Configuration updated
deactivate DDIAPI
```
### Provisioning
**Endpoint:**
```
POST /rest/v1/targets
```
**Request Headers:**
```http
Content-Type: application/json
Authorization: Basic <base64-encoded-credentials>
```
**Request Body:**
```json
[
{
"controllerId": "device-12345",
"name": "Production Device 12345",
"description": "Temperature sensor - Building A",
"address": "https://192.168.1.100",
"securityToken": "myCustomToken123456",
"requestAttributes": true,
"targetType": 1
}
]
```
See [Target Entity Definition](entity-definitions.md#target) for all available fields.
**Response:** 201 Created
```json
[
{
"createdBy": "admin",
"createdAt": 1709212800000,
"lastModifiedBy": "admin",
"lastModifiedAt": 1709212800000,
"controllerId": "device-12345",
"name": "Production Device 12345",
"description": "Temperature sensor - Building A",
"updateStatus": "registered",
"securityToken": "mySecureToken987654321",
"address": "https://192.168.1.100",
"lastControllerRequestAt": 0,
"installedAt": 0,
"_links": {
"self": {
"href": "http://localhost:8080/rest/v1/targets/device-12345"
},
"assignedDS": {
"href": "http://localhost:8080/rest/v1/targets/device-12345/assignedDS"
},
"installedDS": {
"href": "http://localhost:8080/rest/v1/targets/device-12345/installedDS"
},
"attributes": {
"href": "http://localhost:8080/rest/v1/targets/device-12345/attributes"
},
"actions": {
"href": "http://localhost:8080/rest/v1/targets/device-12345/actions"
}
}
}
]
```
### Registration
To complete the whole process, the provisioned device can register itself via the [Direct Device Integration API](direct-device-integration-api.md) using its `controllerId` and `securityToken`.
**Endpoint:**
```
GET /{tenant}/controller/v1/{controllerId}
```
**Request Headers:**
```http
Authorization: TargetToken mySecureToken987654321
```
**Response:** 200 OK
```json
{
"config": {
"polling": {
"sleep": "00:05:00"
}
},
"_links": {
"configData": {
"href": "http://localhost:8080/DEFAULT/controller/v1/device-12345/configData"
}
}
}
```
### Add Device Attributes (Optional)
By following the link to `configData` provided in response to the last call, you can add some attributes to the device. In the code example below, we have shown how to add two attributes, namely hwRevision and VIN.
**Endpoint:** `PUT {tenant}/controller/v1/{controllerId}/configData`
**Authentication:** TargetToken
**Request Headers:**
```http
Content-Type: application/json
Authorization: TargetToken mySecureToken987654321
```
**Request Body:**
```json
{
"mode": "merge",
"data": {
"hwRevision": "2",
"VIN": "JH4TB2H26CC000000"
}
}
```
**Response:** 200 OK
```json
```
### Best Practices
1. **Security Tokens**: Generate strong, unique tokens for each device (at least 32 characters)
2. **Bulk Creation**: Use array notation to create multiple targets in a single request
3. **Target Types**: Use target types to categorize devices (e.g., by hardware model)
4. **Naming Convention**: Use consistent, meaningful naming for `controllerId` (e.g., serial numbers)
5. **Pre-assignment**: Assign distribution sets before devices go online for immediate updates
---
## Direct Registration via Direct Device Integration API
In this scenario, devices register themselves automatically when they first connect to hawkBit. This is called **auto-registration** and is ideal for dynamic environments.
### When to Use
- Devices are manufactured without pre-registration
- You have a dynamic fleet with frequent additions
- Gateway devices manage multiple sub-devices
- You prefer decentralized, self-service provisioning
- IoT scenarios with thousands of devices
### Prerequisites
- Gateway Token authentication enabled on the server:
- Target Security Token mode (per-device tokens), OR
- Gateway Token mode (single token for all devices in a tenant), OR
- Certificate-based authentication (mTLS)
- Device must know its `controllerId` (typically MAC address, serial number, or UUID)
see [Configuration Properties](#configuration-properties) below for details on how to enable authentication modes.
### Workflow
```mermaid
%%{init: {'theme':'base', 'themeVariables': {
'primaryColor':'#6BAF4A',
'primaryTextColor':'#000',
'primaryBorderColor':'#6BAF4A',
'lineColor':'#4A2C5C',
'secondaryColor':'#E8D5F2',
'tertiaryColor':'#6BAF4A',
'noteBkgColor':'#F5F5F5',
'noteTextColor':'#000',
'noteBorderColor':'#6BAF4A',
'actorBorder':'#4A2C5C',
'actorBkg':'#6BAF4A',
'actorTextColor':'#000',
'actorLineColor':'#4A2C5C',
'signalColor':'#4A2C5C',
'signalTextColor':'#000',
'labelBoxBkgColor':'#E8D5F2',
'labelBoxBorderColor':'#6BAF4A',
'labelTextColor':'#000',
'loopTextColor':'#000',
'activationBorderColor':'#4A2C5C',
'activationBkgColor':'#F5F5F5',
'sequenceNumberColor':'#FFF'
}}}%%
sequenceDiagram
participant Device as Device
participant DDIAPI as DDI API<br/>(REST)
participant Server as hawkBit Server
participant MgmtAPI as Management API<br/>(REST)
participant Admin as Admin/Backend System
Note over Device,Admin: Phase 1: Enable Gateway Token Authentication
Admin->>MgmtAPI: GET /rest/v1/system/configs/authentication.gatewaytoken.key
Note right of MgmtAPI: Basic Auth:<br/>admin credentials
activate MgmtAPI
MgmtAPI->>Server: Retrieve Gateway Token
activate Server
Server-->>MgmtAPI: Gateway Token Value
deactivate Server
MgmtAPI-->>Admin: Gateway Token:<br/>3nkswAZhX81oDtktq0FF9Pn0Tc0UGXPW
deactivate MgmtAPI
Note over Device,Admin: Phase 2: Device Auto-Registration (First Connection)
Device->>DDIAPI: GET /{tenant}/controller/v1/{controllerId}
Note right of DDIAPI: Authorization:<br/>GatewayToken {token}
activate DDIAPI
DDIAPI->>Server: Authenticate & Check Target
activate Server
Server->>Server: Target not found
Server->>Server: Auto-create Target:<br/>- controllerId<br/>- updateStatus: "registered"<br/>- createdBy: "system"
Server->>Server: Generate securityToken<br/>Update lastControllerRequestAt
Server-->>DDIAPI: Target Configuration
deactivate Server
DDIAPI-->>Device: 200 OK<br/>Polling interval + links
deactivate DDIAPI
Note left of DDIAPI: config.polling.sleep<br/>_links.configData
Note over Device,Admin: Phase 3: Add Device Attributes (Optional)
Device->>DDIAPI: PUT /{tenant}/controller/v1/{controllerId}/configData
Note right of DDIAPI: Send attributes:<br/>- hw_revision<br/>- os_version<br/>- serial_number<br/>mode: "merge"
activate DDIAPI
DDIAPI->>Server: Update Target Attributes
activate Server
Server->>Server: Merge/Replace/Remove<br/>attributes
Server-->>DDIAPI: 200 OK
deactivate Server
DDIAPI-->>Device: Configuration updated
deactivate DDIAPI
```
### Enable Gateway Token Authentication
All devices share a single token for the tenant. **Use with caution in production.**
**Enable in system configuration:**
```properties
hawkbit.server.ddi.security.authentication.gatewaytoken.enabled=true
```
**Enable in tenant configuration:**
```
authentication.gatewaytoken.enabled=true
```
**Retrieve Gateway Token:**
```bash
curl http://localhost:8080/rest/v1/system/configs/authentication.gatewaytoken.key \
-u admin:admin
```
**Response:**
```json
{
"value": "3nkswAZhX81oDtktq0FF9Pn0Tc0UGXPW",
"global": false,
"lastModifiedAt": 1770794878411,
"lastModifiedBy": "admin",
"createdAt": 1770794562205,
"createdBy": "admin",
"_links": {
"self": {
"href": "http://localhost:8080/rest/v1/system/configs/authentication.gatewaytoken.key"
}
}
}
```
### Device Auto-Registration on First Poll
The device polls the hawkBit server using its `controllerId`. If the target doesn't exist, hawkBit creates it automatically.
**Endpoint:**
```
GET /{tenant}/controller/v1/{controllerId}
```
**Authentication:** GatewayToken
**Request Headers:**
```http
Authorization: GatewayToken 3nkswAZhX81oDtktq0FF9Pn0Tc0UGXPW
```
**Response:** 200 OK
```json
{
"config": {
"polling": {
"sleep": "00:05:00"
}
},
"_links": {
"configData": {
"href": "http://localhost:8080/DEFAULT/controller/v1/device-abc-001/configData"
}
}
}
```
### Add Device Attributes (Optional)
The device can send its attributes (hardware version, OS version, custom data) to hawkBit.
**Endpoint:** `PUT {tenant}/controller/v1/{controllerId}/configData`
**Authentication:** GatewayToken
**Request Headers:**
```http
Content-Type: application/json
Authorization: GatewayToken mySecureToken987654321
```
**Request Body:**
```json
{
"mode": "merge",
"data": {
"hw_revision": "1.2",
"os_version": "Linux 5.10.0",
"serial_number": "SN123456789",
"mac_address": "00:1A:2B:3C:4D:5E"
}
}
```
**Modes:**
- `merge`: Merge new attributes with existing ones
- `replace`: Replace all attributes with new data
- `remove`: Remove specified attributes
**Response:** 200 OK
```json
```
### Best Practices
1. **Authentication**: Use Target Security Tokens or certificates in production; Gateway Tokens only for development
2. **Polling Interval**: Respect the server-provided polling interval to avoid overloading the server
3. **Attributes**: Send detailed device attributes to enable filtering and reporting
4. **Controller ID**: Use persistent, unique identifiers (MAC address, serial number, UUID)
5. **Feedback**: Always send feedback after updates (success/failure) for audit trails
6. **Error Handling**: Implement exponential backoff on connection failures
---
## Comparison: Management API vs DDI API
| Aspect | Management API Provisioning | DDI Auto-Registration |
|--------|----------------------------|----------------------|
| **Timing** | Before device deployment | On first device connection |
| **Control** | Centralized by admin | Decentralized (device-initiated) |
| **Use Case** | Pre-planned deployments | Dynamic fleet management |
| **Authentication** | Basic Auth (admin credentials) | TargetToken / GatewayToken / mTLS |
| **Security Token** | Set during creation or auto-generated | Auto-generated on registration |
| **Pre-assignment** | Possible before device connects | Only after first poll |
| **Scalability** | Manual or scripted bulk creation | Automatic, scales infinitely |
| **Device Attributes** | Must be set via separate request | Device sends on first connection |
| **Audit Trail** | `createdBy: admin` | `createdBy: system` |
---
## Security Considerations
### Management API
1. **Access Control**: Restrict Management API access using role-based permissions
2. **Credentials**: Use strong passwords and consider API keys for automated systems
3. **HTTPS**: Always use HTTPS in production to protect credentials
4. **Token Generation**: Generate cryptographically random security tokens (32+ characters)
5. **Least Privilege**: Grant only necessary permissions (e.g., `CREATE_TARGET` for provisioning systems)
### DDI API
1. **Gateway Token**: Never use in production for large deployments; prefer per-device tokens
2. **Token Storage**: Devices should securely store their security tokens (TPM, secure element)
3. **Certificate Auth**: Use mTLS for maximum security in IoT deployments
4. **Token Rotation**: Consider implementing token rotation mechanisms
5. **Auto-Registration**: Disable auto-registration in highly secure environments; use Management API only
---
## Configuration Properties
### Enable DDI Authentication Modes
**System-wide (application.properties):**
```properties
# Target Security Token (per-device)
hawkbit.server.ddi.security.authentication.targettoken.enabled=true
# Gateway Token (shared token)
hawkbit.server.ddi.security.authentication.gatewaytoken.enabled=true
# Anonymous downloads (not recommended for production)
hawkbit.server.ddi.security.authentication.anonymous.enabled=false
```
---
## Related Documentation
- [Management API](management-api.md) - Complete Management API reference
- [Direct Device Integration API](direct-device-integration-api.md) - Complete DDI API reference
- [Authentication](authentication.md) - Detailed authentication mechanisms
- [Authorization](authorization.md) - Role-based access control
- [Entity Definitions](entity-definitions.md) - Data models and schemas
---

260
docs/entity-definitions.md Normal file
View File

@@ -0,0 +1,260 @@
# Entity Definitions
## Target
Targets represent devices or software instances that can receive software updates.
**Filterable/Sortable Fields:**
| Field | Description | Type |
|------------------------------------|----------------------------------------------------------------------|------|
| `controllerId` | Unique identifier of the target | String |
| `name` | Display name | String |
| `description` | Description text | String |
| `updateStatus` | Current update status (UNKNOWN, IN_SYNC, PENDING, ERROR, REGISTERED) | Enum |
| `address` | IP address or URI | String |
| `lastTargetQuery` | Last time the target polled (timestamp in ms) | Long |
| `createdAt` | Creation timestamp | Long |
| `createdBy` | Creator username | String |
| `lastModifiedAt` | Last modification timestamp | Long |
| `lastModifiedBy` | Last modifier username | String |
| `assignedDistributionSet.name` | Name of assigned distribution set | String |
| `assignedDistributionSet.version` | Version of assigned distribution set | String |
| `installedDistributionSet.name` | Name of installed distribution set | String |
| `installedDistributionSet.version` | Version of installed distribution set | String |
| `targetType.key` | Target type key | String |
| `targetType.name` | Target type name | String |
| `tags.name` | Tag name | String |
| `group` | Group name | String |
| `metadata.<key>` | Metadata value by key | String |
| `controllerAttributes.<key>` | Controller attribute by key | String |
**Example Queries:**
```
# Find targets with update errors
updateStatus==ERROR
# Find targets by name pattern
name==device-*
# Find targets with specific distribution set assigned
assignedDistributionSet.name==Firmware;assignedDistributionSet.version==2.0.0
# Find targets that haven't polled in 24 hours (timestamp example)
lastTargetQuery=lt=1704067200000
# Find targets by tag
tags.name==production
# Find targets by metadata
metadata.location==factory-A
# Find targets by controller attribute
controllerAttributes.firmware_version==1.2.3
```
---
## Distribution Set
Distribution Sets are collections of software modules that can be deployed to targets.
**Filterable/Sortable Fields:**
| Field | Description | Type |
|-------|-------------|------|
| `id` | Unique identifier | Long |
| `name` | Distribution set name | String |
| `version` | Version string | String |
| `description` | Description text | String |
| `type.key` | Distribution set type key | String |
| `type.name` | Distribution set type name | String |
| `valid` | Whether the DS is valid for deployment | Boolean |
| `createdAt` | Creation timestamp | Long |
| `createdBy` | Creator username | String |
| `lastModifiedAt` | Last modification timestamp | Long |
| `lastModifiedBy` | Last modifier username | String |
| `tags.name` | Tag name | String |
| `modules.name` | Software module name | String |
| `metadata.<key>` | Metadata value by key | String |
**Example Queries:**
```
# Find distribution sets by name
name==Firmware*
# Find valid distribution sets only
valid==true
# Find by type
type.key==os_app
# Find by tag
tags.name==release-candidate
# Find distribution sets containing a specific module
modules.name==bootloader
```
---
## Rollout
Rollouts are used to deploy software to groups of targets in a controlled manner.
**Filterable/Sortable Fields:**
| Field | Description | Type |
|-------|-------------|------|
| `id` | Unique identifier | Long |
| `name` | Rollout name | String |
| `description` | Description text | String |
| `status` | Rollout status (CREATING, READY, PAUSED, STARTING, RUNNING, FINISHED, etc.) | Enum |
| `distributionSet.id` | Distribution set ID | Long |
| `distributionSet.name` | Distribution set name | String |
| `distributionSet.version` | Distribution set version | String |
| `distributionSet.type` | Distribution set type | String |
| `createdAt` | Creation timestamp | Long |
| `createdBy` | Creator username | String |
| `lastModifiedAt` | Last modification timestamp | Long |
| `lastModifiedBy` | Last modifier username | String |
**Example Queries:**
```
# Find running rollouts
status==RUNNING
# Find rollouts by name
name==Campaign*
# Find rollouts for a specific distribution set
distributionSet.name==Firmware;distributionSet.version==2.0.0
# Find finished or paused rollouts
status=in=(FINISHED,PAUSED)
```
---
## Action
Actions represent deployment operations assigned to targets.
**Filterable/Sortable Fields:**
| Field | Description | Type |
|-------|-------------|------|
| `id` | Unique identifier | Long |
| `status` | Action status (SCHEDULED, RUNNING, FINISHED, ERROR, CANCELED, etc.) | Enum |
| `active` | Whether the action is currently active | Boolean |
| `weight` | Priority weight (0-1000) | Integer |
| `lastActionStatusCode` | Last status code reported | Integer |
| `externalRef` | External reference string | String |
| `target.controllerId` | Target controller ID | String |
| `target.name` | Target name | String |
| `target.updateStatus` | Target update status | Enum |
| `distributionSet.id` | Distribution set ID | Long |
| `distributionSet.name` | Distribution set name | String |
| `distributionSet.version` | Distribution set version | String |
| `rollout.id` | Rollout ID | Long |
| `rollout.name` | Rollout name | String |
| `rolloutGroup.id` | Rollout group ID | Long |
| `rolloutGroup.name` | Rollout group name | String |
| `createdAt` | Creation timestamp | Long |
| `createdBy` | Creator username | String |
| `lastModifiedAt` | Last modification timestamp | Long |
| `lastModifiedBy` | Last modifier username | String |
**Example Queries:**
```
# Find active actions
active==true
# Find actions by status
status==RUNNING
# Find failed actions
status==ERROR
# Find actions for a specific target
target.controllerId==device-001
# Find actions for a specific rollout
rollout.name==Campaign2024
# Find high-priority actions
weight=gt=800
# Find actions with specific status code
lastActionStatusCode==200
```
---
## Software Module
Software Modules are individual software components that make up distribution sets.
**Filterable/Sortable Fields:**
| Field | Description | Type |
|-------|-------------|------|
| `id` | Unique identifier | Long |
| `name` | Module name | String |
| `version` | Version string | String |
| `description` | Description text | String |
| `type.key` | Software module type key | String |
| `type.name` | Software module type name | String |
| `createdAt` | Creation timestamp | Long |
| `createdBy` | Creator username | String |
| `lastModifiedAt` | Last modification timestamp | Long |
| `lastModifiedBy` | Last modifier username | String |
| `metadata.<key>` | Metadata value by key | String |
**Example Queries:**
```
# Find modules by name
name==bootloader*
# Find modules by type
type.key==os
# Find modules by version
version==2.0.*
# Find modules with specific metadata
metadata.checksum==abc123
```
---
## Target Filter Query
Target Filter Queries define RSQL filters for grouping targets, used for rollouts and auto-assignment.
**Filterable/Sortable Fields:**
| Field | Description | Type |
|-------|-------------|------|
| `id` | Unique identifier | Long |
| `name` | Filter name | String |
| `autoAssignDistributionSet.name` | Auto-assign DS name | String |
| `autoAssignDistributionSet.version` | Auto-assign DS version | String |
| `createdAt` | Creation timestamp | Long |
| `createdBy` | Creator username | String |
| `lastModifiedAt` | Last modification timestamp | Long |
| `lastModifiedBy` | Last modifier username | String |
**Example Queries:**
```
# Find filters by name
name==Production*
# Find filters with auto-assignment configured
autoAssignDistributionSet.name==*
# Find filters for a specific auto-assign distribution set
autoAssignDistributionSet.name==Firmware;autoAssignDistributionSet.version==2.0.0
```
---

View File

@@ -1,66 +0,0 @@
# Features
---
## Device and Software Repository
- Repository that holds the provisioning targets and assignable software distributions.
- Targets can be logically grouped by **Target Types**.
- Includes a full software update history for every device.
- Supports pre-commission devices in the repository and plug and play (device is created when it authenticates for the first time).
---
## Update Management
- Directly deploy a defined software distribution to a device (via Management API).
- Update handling is independent of device type, integration approach, or connectivity.
- Optional user consent flow: download and install updates only after the respective end user has confirmed it.
- Mass cancel distribution of an update by invalidating the distribution set.
- Use action status codes for easier analysis.
---
## Artifact Content Delivery
- Partial downloads supported.
- Download resume supported (RFC7233).
- Content management by RESTful API and UI.
- Authorization based on software assignment (a device can only download what was assigned to it).
- Delta artifact hosting supported.
- Artifact signature hosting supported.
- Plug-point for artifact encryption (allows encryption of artifacts on upload).
---
## Rollout [Campaign] Management
- Secure handling of large volumes of devices at rollout creation time.
- Flexible deployment group definition as part of a rollout.
- Monitoring of rollout progress.
- Emergency rollout shutdown in case of update failures.
- Manually trigger the next rollout group.
---
## Interfaces
### Management API
- RESTful API.
- Create/Read/Update/Delete operations for provisioning targets (devices) and repository content (software).
- Manage and monitor software update operations.
- Online API documentation.
- JSON payload with Hypermedia support.
- Supports filtering, sorting, and paging.
### Direct Device Integration API
- RESTful HTTP-based API for direct device integration.
- JSON payload.
- Traffic optimized (content-based ETag generation, not modified).
- Feedback channel from device.
- TLS encryption.
### Device Management Federation API
- Indirect device integration through a device management service or application into hawkBit.
- Optimized for high service-to-service throughput with AMQP messaging interface.
- Separate AMQP vHost per tenant for maximum security.

View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="inside-docupedia.bosch.com" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" version="27.1.5">
<diagram id="K9Uh00AGhf8SBmCFqn8t" name="Page-1">
<mxGraphModel dx="1183" dy="404" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="LLwMHamqo4jMyC3ISm_Q-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;endArrow=none;endFill=0;startArrow=classic;startFill=1;endSize=4;startSize=4;strokeColor=light-dark(#562563, #ededed);" parent="1" source="LLwMHamqo4jMyC3ISm_Q-33" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="-66.25" y="185" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-2" value="&lt;span style=&quot;color: rgb(86, 37, 99); font-size: 9px;&quot;&gt;&lt;font face=&quot;Garamond&quot;&gt;Trigger Next Group&lt;/font&gt;&lt;/span&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-1" vertex="1" connectable="0">
<mxGeometry x="0.634" y="-1" relative="1" as="geometry">
<mxPoint x="-2" y="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-3" value="" style="endArrow=none;html=1;rounded=0;startSize=4;endSize=4;jumpSize=4;" parent="1" source="LLwMHamqo4jMyC3ISm_Q-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-66.25" y="135" as="sourcePoint" />
<mxPoint x="-66.25" y="187" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-4" value="&lt;div style=&quot;line-height: 90%;&quot;&gt;&lt;font face=&quot;Garamond&quot; style=&quot;font-size: 9px; line-height: 90%;&quot;&gt;Trigger&lt;/font&gt;&lt;div&gt;&lt;font face=&quot;Garamond&quot; style=&quot;font-size: 9px; line-height: 90%;&quot;&gt;Threshold&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#808080;spacing=2;" parent="1" vertex="1">
<mxGeometry x="-95.25" y="100" width="58" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-5" value="" style="endArrow=none;html=1;rounded=0;startSize=4;endSize=4;jumpSize=4;" parent="1" target="LLwMHamqo4jMyC3ISm_Q-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-66.25" y="135" as="sourcePoint" />
<mxPoint x="-66.25" y="187" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-6" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;strokeColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="-76.25" y="125" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-7" value="" style="endArrow=none;html=1;rounded=0;strokeColor=light-dark(#562563, #ededed);" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-140.25" y="183" as="sourcePoint" />
<mxPoint x="-140.25" y="137" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-8" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;strokeColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="-150.25" y="125" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-9" value="&lt;div style=&quot;line-height: 90%;&quot;&gt;&lt;font face=&quot;Garamond&quot;&gt;&lt;font style=&quot;font-size: 9px; line-height: 90%;&quot;&gt;Emergency&amp;nbsp;&lt;/font&gt;&lt;span style=&quot;font-size: 9px; background-color: transparent; color: light-dark(rgb(128, 128, 128), rgb(127, 127, 127));&quot;&gt;Shutdown&lt;/span&gt;&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;font face=&quot;Garamond&quot; style=&quot;font-size: 9px; line-height: 90%;&quot;&gt;Threshold&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=#808080;spacing=2;" parent="1" vertex="1">
<mxGeometry x="-190" y="100" width="99.5" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-10" value="" style="endArrow=none;html=1;rounded=0;strokeColor=light-dark(#6ab252, #ededed);edgeStyle=orthogonalEdgeStyle;" parent="1" source="LLwMHamqo4jMyC3ISm_Q-11" target="LLwMHamqo4jMyC3ISm_Q-35" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-119.25" y="263" as="sourcePoint" />
<mxPoint x="-30.25" y="343" as="targetPoint" />
<Array as="points">
<mxPoint x="-142.25" y="213" />
<mxPoint x="-142.25" y="213" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-11" value="&lt;font face=&quot;Garamond&quot; style=&quot;&quot;&gt;&lt;font style=&quot;font-size: 9px; line-height: 7.2px;&quot;&gt;Successful&lt;br&gt;&lt;/font&gt;&lt;span style=&quot;font-size: 9px; background-color: transparent;&quot;&gt;Updates&lt;/span&gt;&lt;/font&gt;" style="html=1;dashed=0;whiteSpace=wrap;shape=mxgraph.dfd.start;fontSize=10;fillColor=none;strokeColor=light-dark(#6ab252, #ededed);fontColor=light-dark(#6ab252, #ededed);gradientColor=none;" parent="1" vertex="1">
<mxGeometry x="-150" y="204" width="63.75" height="28" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-12" value="&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;font face=&quot;Garamond&quot;&gt;Failed&lt;br&gt;Updates&lt;/font&gt;&lt;/span&gt;" style="html=1;dashed=0;whiteSpace=wrap;shape=mxgraph.dfd.start;fontSize=10;strokeColor=light-dark(#ea6464, #ededed);fillColor=none;fontColor=light-dark(#ea6464, #ededed);" parent="1" vertex="1">
<mxGeometry x="38.75" y="304" width="63.75" height="28" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-13" value="" style="endArrow=none;html=1;rounded=0;strokeColor=light-dark(#ea6464, #ededed);edgeStyle=orthogonalEdgeStyle;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="69.75" y="304" as="sourcePoint" />
<mxPoint x="69.75" y="283" as="targetPoint" />
<Array as="points">
<mxPoint x="69.75" y="303" />
<mxPoint x="69.75" y="303" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-14" value="&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;font face=&quot;Garamond&quot;&gt;Pending&lt;br&gt;Updates&lt;/font&gt;&lt;/span&gt;" style="html=1;dashed=0;whiteSpace=wrap;shape=mxgraph.dfd.start;fontSize=10;fillColor=none;strokeColor=light-dark(#562563, #ededed);fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="155.75" y="353" width="63.75" height="28" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-15" value="" style="endArrow=none;html=1;rounded=0;strokeColor=light-dark(#562563, #ededed);edgeStyle=orthogonalEdgeStyle;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="187" y="353" as="sourcePoint" />
<mxPoint x="187" y="331" as="targetPoint" />
<Array as="points">
<mxPoint x="187" y="340" />
<mxPoint x="187" y="340" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-16" value="&lt;font face=&quot;Garamond&quot;&gt;Deployment Group 1&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="3.75" y="153" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-17" value="&lt;font face=&quot;Garamond&quot;&gt;Deployment Group 2&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="117.75" y="203" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-18" value="&lt;font face=&quot;Garamond&quot;&gt;Deployment Group 3&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="227.75" y="253" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-19" value="&lt;font face=&quot;Garamond&quot;&gt;Deployment Group 4&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="313.75" y="301" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-20" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="141.75" y="301" width="160" height="31" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-21" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=0;fillColor=light-dark(#562563, #1D293B);strokeColor=none;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-20" vertex="1">
<mxGeometry width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-22" value="" style="group" parent="LLwMHamqo4jMyC3ISm_Q-20" vertex="1" connectable="0">
<mxGeometry x="112" y="11" width="40" height="20" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-23" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;strokeColor=light-dark(#6ab252, #121212);fillColor=none;" parent="LLwMHamqo4jMyC3ISm_Q-22" vertex="1">
<mxGeometry width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-24" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;strokeColor=light-dark(#6ab252, #121212);fillColor=none;" parent="LLwMHamqo4jMyC3ISm_Q-22" vertex="1">
<mxGeometry x="10" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-25" value="" style="shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;strokeColor=light-dark(#6ab252, #121212);fillColor=none;" parent="LLwMHamqo4jMyC3ISm_Q-22" vertex="1">
<mxGeometry x="20" width="20" height="20" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-26" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="57.75" y="253" width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-27" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=10;fillColor=light-dark(#6ab252, #1f2f1e);strokeColor=none;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-26" vertex="1">
<mxGeometry x="10" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-28" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=10;fillColor=light-dark(#562563, #1D293B);strokeColor=none;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-26" vertex="1">
<mxGeometry x="110" width="50" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-29" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=0;fillColor=#EA6464;strokeColor=none;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-26" vertex="1">
<mxGeometry width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-30" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="-52.25" y="203" width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-31" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=10;fillColor=light-dark(#6ab252, #1f2f1e);strokeColor=none;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-30" vertex="1">
<mxGeometry x="10" width="90" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-32" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=10;fillColor=light-dark(#562563, #1D293B);strokeColor=none;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-30" vertex="1">
<mxGeometry x="90" width="70" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-33" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=0;fillColor=#EA6464;strokeColor=none;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-30" vertex="1">
<mxGeometry width="20" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-34" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="-162.25" y="153" width="160" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-35" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=10;strokeColor=none;fillColor=light-dark(#6ab252, #ededed);" parent="LLwMHamqo4jMyC3ISm_Q-34" vertex="1">
<mxGeometry x="10" width="110" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-36" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=10;fillColor=light-dark(#562563, #1D293B);strokeColor=none;" parent="LLwMHamqo4jMyC3ISm_Q-34" vertex="1">
<mxGeometry x="110" width="50" height="30" as="geometry" />
</mxCell>
<mxCell id="LLwMHamqo4jMyC3ISm_Q-37" value="" style="html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.arrow;dy=0;dx=10;notch=0;strokeColor=none;fillColor=#EA6464;fontFamily=Helvetica;fontSize=12;fontColor=default;" parent="LLwMHamqo4jMyC3ISm_Q-34" vertex="1">
<mxGeometry width="20" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="inside-docupedia.bosch.com" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36" version="27.1.5">
<diagram id="IN__Ti_x4VDCEzYBR1ER" name="Page-1">
<mxGraphModel dx="2750" dy="1213" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="o7CSASeLWTrb9nB2rvl5-1" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=light-dark(#562563, #959595);fontColor=#333333;" parent="1" vertex="1">
<mxGeometry x="-352" y="340" width="272" height="125" as="geometry" />
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-37" value="" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;endFill=1;jumpSize=6;endSize=4;startSize=4;strokeColor=light-dark(#562563, #ededed);" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-328" y="440" as="sourcePoint" />
<mxPoint x="-232" y="440" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-38" value="" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;startArrow=none;startFill=0;endFill=1;endSize=4;startSize=4;strokeColor=light-dark(#562563, #ededed);" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-328" y="441" as="sourcePoint" />
<mxPoint x="-328" y="358" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-39" value="Time" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="-276" y="438" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-40" value="Load" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelPosition=center;verticalLabelPosition=middle;horizontal=0;fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="-370" y="356" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-41" value="" style="endArrow=none;html=1;rounded=1;curved=0;fillColor=#dae8fc;strokeColor=light-dark(#6AB252,#FFFFFF);strokeWidth=2;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-328" y="440" as="sourcePoint" />
<mxPoint x="-280" y="440" as="targetPoint" />
<Array as="points">
<mxPoint x="-304" y="352" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-42" value="" style="endArrow=classic;html=1;rounded=0;strokeWidth=2;endFill=1;endSize=4;startSize=4;strokeColor=light-dark(#562563, #ededed);" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-214" y="440" as="sourcePoint" />
<mxPoint x="-88" y="440" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-43" value="" style="endArrow=none;html=1;rounded=1;curved=0;strokeWidth=2;fillColor=#008a00;strokeColor=#005700;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-214" y="439" as="sourcePoint" />
<mxPoint x="-166" y="439" as="targetPoint" />
<Array as="points">
<mxPoint x="-190" y="405" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-44" value="" style="endArrow=none;html=1;rounded=1;curved=0;fillColor=#60a917;strokeColor=#2D7600;strokeWidth=2;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-196" y="439" as="sourcePoint" />
<mxPoint x="-148" y="439" as="targetPoint" />
<Array as="points">
<mxPoint x="-172" y="405" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-45" value="" style="endArrow=none;html=1;rounded=1;curved=0;fillColor=#d5e8d4;strokeColor=#82b366;strokeWidth=2;gradientColor=#97d077;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-182" y="439" as="sourcePoint" />
<mxPoint x="-134" y="439" as="targetPoint" />
<Array as="points">
<mxPoint x="-158" y="405" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-46" value="" style="endArrow=none;html=1;rounded=1;curved=0;fillColor=#d5e8d4;strokeColor=#82b366;strokeWidth=2;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-164" y="439" as="sourcePoint" />
<mxPoint x="-116" y="439" as="targetPoint" />
<Array as="points">
<mxPoint x="-140" y="405" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-47" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.577;entryY=0.64;entryDx=0;entryDy=0;entryPerimeter=0;fillColor=#dae8fc;strokeColor=light-dark(#562563, #5c79a3);fontColor=light-dark(#562563, #ededed);" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-277" y="418" as="sourcePoint" />
<mxPoint x="-209.05600000000004" y="418" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="o7CSASeLWTrb9nB2rvl5-48" value="Time" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=light-dark(#562563, #ededed);" parent="1" vertex="1">
<mxGeometry x="-145" y="438" width="60" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -17,6 +17,9 @@ The current version of the Management API is `version 1 (v1)` with the URI `http
- `PUT`
- `DELETE`
### Query parameter
For filtering, sorting and paging as well as using the Feed Item Query Language (FIQL) see [Query parameters](query-parameters.md).
### Headers
For all requests an `Authorization` header has to be set.
- Username: `username`
@@ -44,9 +47,9 @@ A Distribution Set entity may have for example URIs to artifacts, Software Modul
"metadata": {
" href": "http://localhost:8080/rest/v1/softwaremodules/83/metadata?offset=0&limit=50"
}
}
```
## REST Doc
<div style="text-align: right; margin-bottom: 8px;">
<button onclick="window.open('../rest-api/mgmt.html', '_blank')"

132
docs/query-parameters.md Normal file
View File

@@ -0,0 +1,132 @@
# Query Parameters
## Table of Contents
- [Sorting](#sorting)
- [Paging](#paging)
- [Examples](#examples)
- [FIQL Syntax Search Query](#fiql-syntax-search-query)
- [Basic operators and composite operators at a glance](#basic-operators-and-composite-operators-at-a-glance)
- [Basic operators](#basic-operators)
- [Composite operators](#composite-operators)
- [Using wildcards to filter](#using-wildcards-to-filter)
- [Combining Sorting, Paging, and FIQL](#combining-sorting-paging-and-fiql)
## Sorting
The `sort` query parameter defines the sort order for query results.
A sort criteria includes a field name and direction (`ASC` ascending or `DESC` descending).
Multiple criteria can be used, defining the sort order of entities in the result.
**Syntax:**
| Parameter | Value |
|-----------|-------|
| sort | sort_criteria {"," sort_criteria} |
| sort_criteria | field_name ":" ("ASC"\|"DESC") |
| field_name | alpha |
| alpha | (digit\|character){digit\|character}; |
| digit | "0"\|"1"\|"2"\|"3"\|"4"\|"5"\|"6"\|"7"\|"8"\|"9"; |
| character | lowercase_character\|uppercase_character\|special_character |
| special_character | "_" |
| lowercase_character | "a"\|"b"\|"c"\|"d"\|"e"\|"f"\|"g"\|"h"\|"i"\|"j"\|"k"\|"l"\|"m"\|"n"\|"o"\|"p"\|"q"\|"r"\|"s"\|"t"\|"u"\|"v"\|"w"\|"x"\|"y"\|"z"; |
| uppercase_character | "A"\|"B"\|"C"\|"D"\|"E"\|"F"\|"G"\|"H"\|"I"\|"J"\|"K"\|"L"\|"M"\|"N"\|"O"\|"P"\|"Q"\|"R"\|"S"\|"T"\|"U"\|"V"\|"W"\|"X"\|"Y"\|"Z"; |
**Example:**
```
/targets?sort=field_1:ASC,field_2:DESC,field_3:ASC
```
## Paging
Pagination is automatically applied to all GET requests for collection resources.
**Configuration parameters:**
- `offset`: paging offset (default is 0)
- `limit`: maximum entries per page (default is 50)
The maximum value for `limit` is 500. For groups, the maximum is 1000 (subject to change in future versions).
Invalid values default to standard settings. Limits exceeding the maximum use the maximum value instead.
### Examples
| URL | Description |
|-----|-------------|
| `/targets?sort=name:ASC` | Sorts targets by name, returns first 50 (default offset 0, default limit 50) |
| `/targets?sort=name:ASC&limit=10` | Sorts targets by name, returns first 10 |
| `/targets?sort=name:ASC&offset=10` | Sorts targets by name, returns next 50 targets after the 10th (starting with 11th) |
| `/targets?sort=name:ASC&offset=20&limit=10` | Sorts targets by name, returns next 10 targets after the 20th (starting with 21st) |
| `/targets?sort=name:ASC&offset=100&limit=600` | Sorts targets by name, returns next 500 targets (max limit, not 600) after the 100th (starting with 101st) |
## FIQL Syntax Search Query
The `q` parameter filters resource fields using Feed Item Query Language (FIQL).
**Syntax:**
```
q=FIQL-expression
```
**Expression structure:**
```
q=field<basic_operator>value<composite_operator>field<basic_operator>value<...>
```
- `q`: identifier for FIQL query
- `field`: resource field name (see Entity definitions for filterable fields)
- `value`: field value
- `<basic_operator>`: operators for simple queries
- `<composite_operator>`: operators to join simple queries
### Basic Operators and Composite Operators at a Glance
#### Basic Operators:
| Operator | Description | Example |
|----------|-------------|---------|
| `==` | Equal to expression | `/targets?q=name==ccu299792` |
| `!=` | Not equal to expression | `/targets?q=name!=ccu299792` |
| `=lt=` | Less than expression | `/distributionsets?q=id=lt=142` |
| `=le=` | Less than or equal expression | `/distributionsets?q=id=le=142` |
| `=gt=` | Greater than expression | `/distributionsets?q=id=gt=142` |
| `=ge=` | Greater than or equal expression | `/distributionsets?q=id=ge=142` |
| `=li=` | Like expression | `/targets?q=name=li=_________0` |
| `=in=` | In expression | `/targets?q=name=in=(ccu299792, shc137)` |
| `=out=` | Not in (out) expression | `/targets?q=name=out=(ccu299792, shc137)` |
#### Composite Operators:
| Operator | Description | Example |
|--------------|-------------|-------------------------------------------------------------------|
| `and` or `;` | AND expression | `/rest/v1/targets?q=updatestatus==unknown and controllerId==SHC*` |
| `or` or `,` | OR expression | `/rest/v1/targets?q=updatestatus==unknown or updatestatus==error` |
### Using Wildcards to Filter
Use `*` for wildcard matches.
| Example URL | Description |
|-------------|-------------|
| `/targets?q=name==ccu*` | Returns targets with names starting with ccu |
| `/targets?q=name==*ccu` | Returns targets with names ending with ccu |
| `/targets?q=name==*ccu*` | Returns targets containing ccu in their name |
| `/targets?q=name=="ccu\\*"` | Returns targets with names starting with ccu* |
| `/targets?q=name=="*\\*\*"` | Returns targets containing asterisk(*) in their names |
### Combining Sorting, Paging, and FIQL
| Example URL | Description |
|-----------------------------------------------------------------------------------------------------|-------------|
| `/targets?sort=controllerId:DESC&limit=5&q=updatestatus==pending` | Returns 5 targets with updatestatus 'pending', sorted descending |
| `/softwaremodules?sort=name:ASC&q=version==5.1.1 and type==application` | Returns software modules sorted by name, with version 5.1.1 and type application |
| `/distributionsets?sort=name:DESC&limit=150&q=name==*CCU* or description==*CCU*` | Returns 150 distribution sets sorted descending by name with CCU in name or description |
| `/distributionsettypes?limit=100&offset=100&q=key==vhicletypex2015` | Returns 100 distribution set types (starting with 101st) with key vhicletypex2015 |
| `/targets?sort=name:ASC&offset=100&limit=25&q=(description==*SH* or name==*SH*) and name=li=_____` | Returns 25 targets (starting with 101st), sorted ascending, with 'SH' in name or description and exactly 5 characters |
| `/targets?sort=name:DESC&limit=50&q=name=in=(*ccu*, *ecu*) and updatestatus=in=(pending, in\_sync)` | Returns 50 targets sorted descending with 'ccu' or 'ecu' in name and updatestatus 'pending' or 'in_sync' |