GET /rest/v1/actions
Implementation notes
Handles the GET request of retrieving all actions within Bosch IoT Rollouts. Required permission: READ_TARGET
Get paged list of actions
CURL
$ curl 'https://management-api.host.com/rest/v1/actions' -i -X GET
Request URL
A GET
request is used to access the actions
GET /rest/v1/actions HTTP/1.1
Host: management-api.host.com
Request query parameter
Parameter | Description |
---|---|
|
The maximum number of entries in a page (default is 50). |
|
The query parameter sort allows to define the sort order for the result of a query. A sort criteria consists of the name of a field and the sort direction (ASC for ascending and DESC descending). The sequence of the sort criteria (multiple can be used) defines the sort order of the entities in the result. |
|
The paging offset (default is 0). |
|
Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for available fields. |
|
The representation mode. Can be "full" or "compact". Defaults to "compact" |
Request parameter example
GET /rest/v1/actions?limit=10&sort=id:ASC&offset=0&q=rollout.id%3D%3D1&representation=full HTTP/1.1
Host: management-api.host.com
Response (Status 200)
Response fields
Path | Type | Description | Allowed Values |
---|---|---|---|
size |
Number |
Current page size |
|
total |
Number |
Total number of elements |
|
content[] |
Array |
List of actions. |
|
content[].createdBy |
String |
Entity was originally created by (User, AMQP-Controller, anonymous etc.) |
|
content[].createdAt |
Number |
Entity was originally created at (timestamp UTC in milliseconds) |
|
content[].lastModifiedBy |
String |
Entity was last modified by (User, AMQP-Controller, anonymous etc.) |
|
content[].lastModifiedAt |
String |
Entity was last modified at (timestamp UTC in milliseconds) |
|
content[].type |
String |
Type of action. |
['update', 'cancel'] |
content[].status |
String |
Status of action. |
['finished', 'pending'] |
content[].detailStatus |
String |
Detailed status of action. |
['finished', 'error', 'running', 'warning', 'scheduled', 'canceling', 'canceled', 'download', 'downloaded', 'retrieved', 'cancel_rejected'] |
content[].lastStatusCode |
Integer |
(Optional) Code provided as part of the last status update that was sent by the device. |
|
content[]._links |
Object |
The link to the action. |
|
content[].id |
Number |
ID of the action. |
|
content[].weight |
Number |
Weight of the action showing the importance of the update. |
|
content[].rollout |
Number |
The ID of the rollout this action was created for. |
|
content[].rolloutName |
String |
The name of the rollout this action was created for. |
Response example
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 546
{
"content" : [ {
"createdBy" : "bumlux",
"createdAt" : 1691065905897,
"lastModifiedBy" : "bumlux",
"lastModifiedAt" : 1691065906407,
"type" : "update",
"status" : "finished",
"detailStatus" : "finished",
"weight" : 600,
"rollout" : 2,
"rolloutName" : "rollout",
"lastStatusCode" : 200,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/targets/target137/actions/7"
}
},
"id" : 7,
"forceType" : "forced"
} ],
"total" : 1,
"size" : 1
}
Response example for representation mode 'full'
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1058
{
"content" : [ {
"createdBy" : "bumlux",
"createdAt" : 1691065902492,
"lastModifiedBy" : "bumlux",
"lastModifiedAt" : 1691065903238,
"type" : "update",
"status" : "finished",
"detailStatus" : "finished",
"rollout" : 1,
"rolloutName" : "rollout",
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/targets/target137/actions/6"
},
"target" : {
"href" : "https://management-api.host.com/rest/v1/targets/target137",
"name" : "target137"
},
"distributionset" : {
"href" : "https://management-api.host.com/rest/v1/distributionsets/11",
"name" : "DS:1.0"
},
"status" : {
"href" : "https://management-api.host.com/rest/v1/targets/target137/actions/6/status?offset=0&limit=50&sort=id%3ADESC"
},
"rollout" : {
"href" : "https://management-api.host.com/rest/v1/rollouts/1",
"name" : "rollout"
}
},
"id" : 6,
"forceType" : "forced"
} ],
"total" : 1,
"size" : 1
}
Error responses
HTTP Status Code | Reason | Response Model |
---|---|---|
|
Bad Request - e.g. invalid parameters |
|
|
The request requires user authentication. |
|
|
Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies. |
See Error body |
|
The http request method is not allowed on the resource. |
|
|
In case accept header is specified and not application/json. |
|
|
Too many requests. The server will refuse further attempts and the client has to wait another second. |
GET /rest/v1/actions/{actionId}
Implementation notes
Handles the GET request of retrieving a single action within Hawkbit by actionId.
Get single action
CURL
$ curl 'https://management-api.host.com/rest/v1/actions/8' -i -X GET
Request URL
A GET
request is used to access a single action
GET /rest/v1/actions/8 HTTP/1.1
Host: management-api.host.com
Response (Status 200)
Response fields
Path | Type | Description | Allowed Values |
---|---|---|---|
createdBy |
String |
Entity was originally created by (User, AMQP-Controller, anonymous etc.) |
|
createdAt |
Number |
Entity was originally created at (timestamp UTC in milliseconds) |
|
id |
Number |
ID of the action. |
|
lastModifiedBy |
String |
Entity was last modified by (User, AMQP-Controller, anonymous etc.) |
|
lastModifiedAt |
String |
Entity was last modified at (timestamp UTC in milliseconds) |
|
type |
String |
Type of action. |
['update', 'cancel'] |
forceType |
String |
Force type of the action that provides a hint if the controller should apply the action immediately or whenever possible. |
['forced', 'soft', 'timeforced'] |
status |
String |
Status of action. |
['finished', 'pending'] |
detailStatus |
String |
Detailed status of action. |
['finished', 'error', 'running', 'warning', 'scheduled', 'canceling', 'canceled', 'download', 'downloaded', 'retrieved', 'cancel_rejected'] |
lastStatusCode |
Integer |
(Optional) Code provided as part of the last status update that was sent by the device. |
|
rollout |
Number |
The ID of the rollout this action was created for. |
|
rolloutName |
String |
The name of the rollout this action was created for. |
|
_links.distributionset |
Object |
The link to the distribution set. |
|
_links.status |
Object |
The link to all statuses of the action. |
|
_links.rollout |
Object |
The link to the rollout. |
|
_links.target |
Object |
The link to the target. |
Response example
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 969
{
"createdBy" : "bumlux",
"createdAt" : 1691065910707,
"lastModifiedBy" : "bumlux",
"lastModifiedAt" : 1691065911286,
"type" : "update",
"status" : "finished",
"detailStatus" : "finished",
"rollout" : 3,
"rolloutName" : "rollout",
"lastStatusCode" : 200,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/targets/target137/actions/8"
},
"target" : {
"href" : "https://management-api.host.com/rest/v1/targets/target137",
"name" : "target137"
},
"distributionset" : {
"href" : "https://management-api.host.com/rest/v1/distributionsets/13",
"name" : "DS:1.0"
},
"status" : {
"href" : "https://management-api.host.com/rest/v1/targets/target137/actions/8/status?offset=0&limit=50&sort=id%3ADESC"
},
"rollout" : {
"href" : "https://management-api.host.com/rest/v1/rollouts/3",
"name" : "rollout"
}
},
"id" : 8,
"forceType" : "forced"
}
HTTP Status Code | Reason | Response Model |
---|---|---|
|
Bad Request - e.g. invalid parameters |
|
|
The request requires user authentication. |
|
|
Not Found Target. |
See Error body |
|
In case accept header is specified and not application/json. |
|
|
Too many requests. The server will refuse further attempts and the client has to wait another second. |
Additional content
Error body
{
"errorCode": "string",
"exceptionClass": "string",
"message": "string",
"parameters": [
"string"
]
}
Field description
Field |
Description |
errorCode |
A error code/key set by server |
exceptionClass |
The involved exceptionClass |
message |
An error message set by the server |
parameters |
A list of parameters |