Skip to content

Get the activity feed

GET
/activity
curl --request GET \
--url 'https://app.buildtrace.eu/api/activity?limit=50' \
--header 'Authorization: Bearer <token>'

Returns a recent org-wide activity feed (serial events, audit events, stock movements), newest-first.

Required scope: dashboard:read.

limit
integer
default: 50 >= 1 <= 200

OK

Media typeapplication/json
Array<object>

One entry of the org activity feed, with what a client needs to write it as a sentence: who did it (actorName, actorKind), what happened (type + action), what it happened to (subject, with a human label) and the key facts (details, changes). The same act is never reported twice: where an audit event and a serial event or stock movement record one act, only the richer one is returned.

object
id
required
string format: uuid
type
required

Where the event comes from.

string
Allowed values: serial_event audit_event stock_movement
action
required

What happened. For audit_event the audit action (e.g. bom.add_line, revision.release, inspection.record); for serial_event the serial event type (RECEIVED, MOVED, QUARANTINED, RELEASED, SCRAPPED, SHIPPED, FIRMWARE_FLASHED); for stock_movement the movement type (RECEIVE, TRANSFER, ADJUST).

string
summary
required

Machine-ish one-line summary kept for older clients. Use action, subject and details.

string
occurredAt
required
string format: date-time
actorName
required

Who did it - the member’s name, the service account’s name, or “System”.

string
actorKind
required
string
Allowed values: account service_account system
refType

The raw entity type the event was recorded against (e.g. bom_line, serial).

string
refId

The raw entity id the event was recorded against.

string format: uuid
subject

The thing the event is about, which a client links to. Not always the raw recorded entity: a BOM line event is about the parent revision, an inspection about the unit (or the revision for a lot inspection), an upload about the entity the file is attached to.

object
type
required
string
Allowed values: part revision serial bom_line build_order eco rework_order device firmware_version location supplier attachment numbering_scheme inspection as_built_record
id
required
string format: uuid
label

The identifier people use: part code, serial number, build/rework order number, ECO number, device id, location or supplier code, firmware “ ”, file name, numbering scope. For a revision the part code (see revisionLabel). Absent when the entity no longer exists and the event recorded no name for it.

string
revisionLabel

The revision label, when type is revision.

string
partId

The part, when type is part or revision.

string format: uuid
deleted
required

The entity no longer exists (or can’t be found in this organization).

boolean
details

Key facts for the sentence. Only the fields that apply to the action are set.

object
part

Another part involved - the child part of a BOM line, the assembly of a build order.

string
revision

Revision label of that part, when known (build order assembly).

string
quantity

Quantity (BOM line quantity, build order target, stock moved), plain decimal.

string
previousQuantity

The quantity before an edit.

string
uom

Unit of measure of the quantity.

string
increase

For a stock adjustment, true when stock went up.

boolean
result

Inspection result (PASS, FAIL, CONDITIONAL).

string
inspectionType

Inspection type (INCOMING, IN_PROCESS, FINAL, FIELD).

string
lot
string
fromLocation

Location code moved from.

string
toLocation

Location code moved to.

string
reason

Free-text reason given (quarantine, scrap, adjustment, cancellation).

string
reworkReason

Rework reason code (ECO_RETROFIT, RMA_REPAIR, FIELD_SERVICE, UPGRADE, SALVAGE).

string
firmware

Firmware reported by a unit, “ ”.

string
filename
string
attachmentKind
string
unit

Serial number of the unit involved (rework order, device).

string
title

ECO title.

string
scope

Numbering scope (SERIAL, LOT, DEVICE, BUILD_ORDER, REWORK_ORDER).

string
fleet

Name of the fleet a firmware version was assigned to.

string
device

Identifier of the device a firmware version was assigned to.

string
changes

Field changes recorded with the event (from/to as display strings).

Array<object>
object
field
required
string
from
string
to
string

Example

[
{
"type": "serial_event",
"actorKind": "account",
"subject": {
"type": "part"
}
}
]

Unauthorized

Forbidden