Passar para o conteúdo principal

FMEA Events

Atualizado essa semana

Webhook payload models for FMEA (Failure Mode and Effects Analysis) events and inspections.

FMEA Event

Fields

- target (string): Target of the action (e.g., "fmeaEvent").

- targetId (string): ID of the affected event.

- action (string): Action performed on the event (e.g., "created", "updated", "deleted").

- date (string): ISO 8601 timestamp of the event.

- byUserId (string): ID of the user who triggered the event.

- companyId (string): Company ID.

- service (string): Service that emitted the event.

- metadata (Metadata): Additional event metadata.

- newData (FMEAEventData): Struct containing the new state of the FMEA event.

- oldData (FMEAEventData): Struct containing the previous state of the FMEA event.

FMEAEventData Struct

The FMEAEventData struct contains the following fields:

- id (string): FMEA event ID.

- title (string): Event title.

- type (string): Event type.

- assetId (string): Associated asset ID.

- companyId (string): Company ID.

- parentId (string): Parent record ID.

- madeBy (string): User ID who created the event.

- fixStatus (string): Fix status (e.g., "pending", "fixed").

- startDate (string): ISO 8601 start date.

- createdAt (string): ISO 8601 creation timestamp.

- updatedAt (string): ISO 8601 last update timestamp.

- createdByUserId (string): Creator user ID.

- number (int): Sequential number.

- createdFrom (CreatedFrom): Origin of the event creation.

- insights ([]Insight): List of associated insights.

CreatedFrom Struct

The CreatedFrom struct contains the following fields:

- origin (string): Origin system (e.g., "manual", "sensor").

- originId (string): ID in the origin system.

Insight Struct

The Insight struct contains the following fields:

- id (string): Insight ID.

- assetId (string): Associated asset ID.

- eventId (string): Associated FMEA event ID.

- companyId (string): Company ID.

- type (string): Insight type.

- status (string): Insight status.

- state (string): Insight state.

- number (int): Sequential number.

- version (int): Version counter.

- referenceDate (string): ISO 8601 reference date.

- checkedAt (string): ISO 8601 timestamp when checked.

- checkedByUserId (string): User ID who checked the insight.

- createdAt (string): ISO 8601 creation timestamp.

- updatedAt (string): ISO 8601 last update timestamp.

- updatedByUserId (string): Last updater user ID.

Metadata Struct

The Metadata struct contains the following fields:

- isInternal (bool): Whether the event is internal.

Example (JSON)

{

"target": "fmeaEvent",

"targetId": "event-001",

"action": "updated",

"date": "2025-09-29T18:04:03Z",

"byUserId": "user-abc",

"companyId": "company-xyz",

"service": "fmea-service",

"metadata": {

"isInternal": false

},

"newData": {

"id": "event-001",

"title": "Bearing overheating",

"type": "failure",

"assetId": "asset-001",

"companyId": "company-xyz",

"parentId": "parent-001",

"madeBy": "user-abc",

"fixStatus": "fixed",

"startDate": "2025-09-28T08:00:00Z",

"createdAt": "2025-09-28T08:00:00Z",

"updatedAt": "2025-09-29T18:04:03Z",

"createdByUserId": "user-abc",

"number": 5,

"createdFrom": {

"origin": "manual",

"originId": ""

},

"insights": [

{

"id": "insight-001",

"assetId": "asset-001",

"eventId": "event-001",

"companyId": "company-xyz",

"type": "vibration",

"status": "resolved",

"state": "closed",

"number": 1,

"version": 2,

"referenceDate": "2025-09-27T00:00:00Z",

"checkedAt": "2025-09-29T10:00:00Z",

"checkedByUserId": "user-abc",

"createdAt": "2025-09-27T12:00:00Z",

"updatedAt": "2025-09-29T10:00:00Z",

"updatedByUserId": "user-abc"

}

]

},

"oldData": {

"id": "event-001",

"title": "Bearing overheating",

"type": "failure",

"assetId": "asset-001",

"companyId": "company-xyz",

"parentId": "parent-001",

"madeBy": "user-abc",

"fixStatus": "pending",

"startDate": "2025-09-28T08:00:00Z",

"createdAt": "2025-09-28T08:00:00Z",

"updatedAt": "2025-09-29T09:00:00Z",

"createdByUserId": "user-abc",

"number": 5,

"createdFrom": {

"origin": "manual",

"originId": ""

},

"insights": []

}

}

Respondeu à sua pergunta?