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

limit

The maximum number of entries in a page (default is 50).

sort

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.

offset

The paging offset (default is 0).

q

Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for available fields.

representation

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[]._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: 518

{
  "content" : [ {
    "createdBy" : "bumlux",
    "createdAt" : 1673690049547,
    "lastModifiedBy" : "bumlux",
    "lastModifiedAt" : 1673690049846,
    "type" : "update",
    "status" : "finished",
    "detailStatus" : "finished",
    "weight" : 600,
    "rollout" : 2,
    "rolloutName" : "rollout",
    "_links" : {
      "self" : {
        "href" : "https://management-api.host.com/rest/v1/targets/target137/actions/2"
      }
    },
    "id" : 2,
    "forceType" : "forced"
  } ],
  "total" : 1,
  "size" : 1
}

Response example for representation mode 'full'

HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1055

{
  "content" : [ {
    "createdBy" : "bumlux",
    "createdAt" : 1673690047067,
    "lastModifiedBy" : "bumlux",
    "lastModifiedAt" : 1673690047450,
    "type" : "update",
    "status" : "finished",
    "detailStatus" : "finished",
    "rollout" : 1,
    "rolloutName" : "rollout",
    "_links" : {
      "self" : {
        "href" : "https://management-api.host.com/rest/v1/targets/target137/actions/1"
      },
      "target" : {
        "href" : "https://management-api.host.com/rest/v1/targets/target137",
        "name" : "target137"
      },
      "distributionset" : {
        "href" : "https://management-api.host.com/rest/v1/distributionsets/1",
        "name" : "DS:1.0"
      },
      "status" : {
        "href" : "https://management-api.host.com/rest/v1/targets/target137/actions/1/status?offset=0&limit=50&sort=id:DESC"
      },
      "rollout" : {
        "href" : "https://management-api.host.com/rest/v1/rollouts/1",
        "name" : "rollout"
      }
    },
    "id" : 1,
    "forceType" : "forced"
  } ],
  "total" : 1,
  "size" : 1
}

Error responses

HTTP Status Code Reason Response Model

400 Bad Request

Bad Request - e.g. invalid parameters

401 Unauthorized

The request requires user authentication.

403 Forbidden

Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies.

See Error body

405 Method Not Allowed

The http request method is not allowed on the resource.

406 Not Acceptable

In case accept header is specified and not application/json.

429 Too Many Request

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