SDU Server API API Reference
The SDU API enables Maintainers, Managers and Devices to interact with the SDU server. The server manages updates with two types of data: The BLOB (Binary Large Object), which holds the data of an update, and a Manifest that assigns product type, version and signature to a BLOB.
API Endpoint
https://[customer]-sdu.ssv-service.de/v2
Contact: jfi@ssv-embedded.de
Schemes: https
Version: 2.1.0
Maintainer
Get a list of present BLOBs
List of present blobs
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"blobs": [
{
"sha256": "string",
"date": "string (date-time)",
"size": "integer",
"maintainer": "string",
"referencedByVersion": "boolean"
}
]
}
Get info about existing BLOB
SHA256 of the BLOB
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"blob": {
"sha256": "string",
"date": "string (date-time)",
"size": "integer",
"maintainer": "string",
"referencedByVersion": "boolean"
}
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Upload a new BLOB
SHA256 of the content
The data has been accepted
SHA256 mismatch
Blob already existing
Blob too large
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer"
}
Response Example (400 Bad Request)
{
"code": "integer",
"error": "string"
}
Response Example (409 Conflict)
{
"code": "integer",
"error": "string"
}
Response Example (413 Request Entity Too Large)
{
"code": "integer",
"error": "string"
}
Delete an existing BLOB
SHA256 of the content
The blob has been delete
Blob is referenced by a version
Blob does not exist
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer"
}
Response Example (400 Bad Request)
{
"code": "integer",
"error": "string"
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Download an existing BLOB
SHA256 of the BLOB
Data
Blob does not exist
Response Content-Types: application/octet-stream
Get the delta between a known BLOB and a desired BLOB
SHA256 of the desired BLOB
SHA256 of the known BLOB
The xdelta3 diff to the given hash
Blob does not exist
Blob with the given knownfilesha256 does not exist
Response Content-Types: application/octet-stream
Get a list of all products
Current version assignment
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"products": [
"string"
]
}
Get a list of all existing versions for a product
Product Name
Maintainer
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"versions": [
{
"date": "string (date-time)",
"name": "string",
"maintainer": "string",
"available": "boolean"
}
]
}
Get information about a version
Product Name
Version Name
Version
Version not found
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"version": {
"date": "string (date-time)",
"name": "string",
"maintainer": "string",
"available": "boolean"
}
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Download the version's manifest
Product Name
Version Name
The version's mainfest file
Version not found
Response Content-Types: application/cms
Response Headers (200 OK)
X-Upload-Date |
Upload date as Unix timestamp |
integer |
Upload the version's manifest
Product Name
Version Name
Request Content-Types: application/cms
Request Example
"string"
The data has been accepted
The version already exists or the manifest is invalid
Response Example (400 Bad Request)
{
"code": "integer",
"error": "string"
}
Manager
Get a list of present BLOBs
List of present blobs
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"blobs": [
{
"sha256": "string",
"date": "string (date-time)",
"size": "integer",
"maintainer": "string",
"referencedByVersion": "boolean"
}
]
}
Get info about existing BLOB
SHA256 of the BLOB
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"blob": {
"sha256": "string",
"date": "string (date-time)",
"size": "integer",
"maintainer": "string",
"referencedByVersion": "boolean"
}
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Delete an existing BLOB
SHA256 of the content
The blob has been delete
Blob is referenced by a version
Blob does not exist
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer"
}
Response Example (400 Bad Request)
{
"code": "integer",
"error": "string"
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Download an existing BLOB
SHA256 of the BLOB
Data
Blob does not exist
Response Content-Types: application/octet-stream
Get the delta between a known BLOB and a desired BLOB
SHA256 of the desired BLOB
SHA256 of the known BLOB
The xdelta3 diff to the given hash
Blob does not exist
Blob with the given knownfilesha256 does not exist
Response Content-Types: application/octet-stream
Get a list of all products
Current version assignment
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"products": [
"string"
]
}
Get the current version
Product Name
Managers must state a serialnumber get the right version info. For devices this parameter is ignored and the common name of the device's certificate is used instead.
Give information about the currently installed version. This will be written to the SDU server's log.
Current version assignment
No assignment available for this product or serialnumber
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"currentVersion": {
"date": "string (date-time)",
"manager": "string",
"name": "string"
}
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Get the current version assignment
Product Name
Current assignments
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"currentVersionAssignments": [
{
"id": "string",
"date": "string (date-time)",
"manager": "string",
"serialnumberFilter": "string",
"versionName": "string"
}
]
}
Append a version assignment
Version assignment
Product Name
Request Content-Types: application/json
Request Example
{
"currentVersionAssignment": {
"serialnumberFilter": "string",
"versionName": "string"
}
}
Insert a version assignment before the given assignment
Version assignment
Product Name
Existing assignment ID
Request Content-Types: application/json
Request Example
{
"currentVersionAssignment": {
"serialnumberFilter": "string",
"versionName": "string"
}
}
New assignment accepted
Invalid assignment
Unknown assignment
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer"
}
Response Example (400 Bad Request)
{
"code": "integer",
"error": "string"
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Remove the given assignment
Product Name
Assignment ID
Modify the given assignment
Version assignment
Product Name
Assignment ID
Request Content-Types: application/json
Request Example
{
"currentVersionAssignment": {
"serialnumberFilter": "string",
"versionName": "string"
}
}
New assignment accepted
Invalid assignment
Unknown assignment
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer"
}
Response Example (400 Bad Request)
{
"code": "integer",
"error": "string"
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Get a list of all existing versions for a product
Product Name
Maintainer
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"versions": [
{
"date": "string (date-time)",
"name": "string",
"maintainer": "string",
"available": "boolean"
}
]
}
Get information about a version
Product Name
Version Name
Version
Version not found
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"version": {
"date": "string (date-time)",
"name": "string",
"maintainer": "string",
"available": "boolean"
}
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Mark the version as available or unavailable
undefined
Product Name
Version Name
Request Content-Types: application/json
Request Example
{
"version": {
"available": "boolean"
}
}
Download the version's manifest
Product Name
Version Name
The version's mainfest file
Version not found
Response Content-Types: application/cms
Response Headers (200 OK)
X-Upload-Date |
Upload date as Unix timestamp |
integer |
Devices
Download an existing BLOB
SHA256 of the BLOB
Data
Blob does not exist
Response Content-Types: application/octet-stream
Get the delta between a known BLOB and a desired BLOB
SHA256 of the desired BLOB
SHA256 of the known BLOB
The xdelta3 diff to the given hash
Blob does not exist
Blob with the given knownfilesha256 does not exist
Response Content-Types: application/octet-stream
Get the current version
Product Name
Managers must state a serialnumber get the right version info. For devices this parameter is ignored and the common name of the device's certificate is used instead.
Give information about the currently installed version. This will be written to the SDU server's log.
Current version assignment
No assignment available for this product or serialnumber
Response Content-Types: application/json
Response Example (200 OK)
{
"code": "integer",
"currentVersion": {
"date": "string (date-time)",
"manager": "string",
"name": "string"
}
}
Response Example (404 Not Found)
{
"code": "integer",
"error": "string"
}
Download the version's manifest
Product Name
Version Name
The version's mainfest file
Version not found
Response Content-Types: application/cms
Response Headers (200 OK)
X-Upload-Date |
Upload date as Unix timestamp |
integer |
Schema Definitions
Error: object
- code: integer
-
Error number for machines
- error: string
-
Human-readable error describing the problem
Example
{
"code": "integer",
"error": "string"
}
Blob: object
- sha256: string
-
The content's SHA256
- date: string (date-time)
-
Update date of this definition
- size: integer
-
Size of the BLOB in bytes
- maintainer: string
-
Maintainer who uploaded this BLOB
- referencedByVersion: boolean
-
Indicates whether this BLOB is used by any uploaded version
Example
{
"sha256": "string",
"date": "string (date-time)",
"size": "integer",
"maintainer": "string",
"referencedByVersion": "boolean"
}
BlobInfo: object
- code: integer
-
Always zero
- blob: Blob
Example
{
"code": "integer",
"blob": {
"sha256": "string",
"date": "string (date-time)",
"size": "integer",
"maintainer": "string",
"referencedByVersion": "boolean"
}
}
ProductList: object
- code: integer
-
Always zero
- products: string[]
-
string
Example
{
"code": "integer",
"products": [
"string"
]
}
Version: object
- date: string (date-time)
-
Upload date of this version
- name: string
-
Version name
- maintainer: string
-
The maintainer who signed this version
- available: boolean
-
Is this version downloadable by devices?
Example
{
"date": "string (date-time)",
"name": "string",
"maintainer": "string",
"available": "boolean"
}
VersionInfo: object
- code: integer
-
Always zero
- version: Version
Example
{
"code": "integer",
"version": {
"date": "string (date-time)",
"name": "string",
"maintainer": "string",
"available": "boolean"
}
}
VersionEdit: object
- version: object
-
- available: boolean
-
Is this version downloadable by devices?
Example
{
"version": {
"available": "boolean"
}
}
CurrentVersion: object
- code: integer
-
Always zero
- currentVersion: object
-
- date: string (date-time)
-
Update date of this definition
- manager: string
-
Manager who stored this definition
- name: string
-
Version to install
Example
{
"code": "integer",
"currentVersion": {
"date": "string (date-time)",
"manager": "string",
"name": "string"
}
}
CurrentVersionAssignmentList: object
- code: integer
-
Always zero
- currentVersionAssignments: object[]
-
object - id: string
-
A random identifier for this assignment
- date: string (date-time)
-
Update date of this definition
- manager: string
-
Manager who stored this definition
- serialnumberFilter: string
-
Regular expression for matching serial numbers
- versionName: string
-
Version string
Example
{
"code": "integer",
"currentVersionAssignments": [
{
"id": "string",
"date": "string (date-time)",
"manager": "string",
"serialnumberFilter": "string",
"versionName": "string"
}
]
}