Create Asset Diagnostic Symptoms

You can use REST API to create asset diagnostic symptoms. Symptoms are codified events, states, or measurements used to predict and diagnose failures; for example, on-board diagnostic (OBD) codes from a car, the liquid contact indicator on a cell phone, or a high-temperature anomaly from an IoT sensor.

Symptoms are linked to a work order and provide additional context to help technicians perform their work, and provide very useful data for analyzing root causes and predicting failures. Symptoms generally provide a snapshot of information at the specific time a work order is created or at the specific time an anomalous behavior occurred.

A symptom is always associated with a work order, and there can be multiple symptoms per work order.

Here's a typical application processing flow for the scenarios:

  1. You create an asset diagnostic symptom.
  2. You may choose to update an existing asset diagnostic symptom.
  3. You may choose to delete an existing asset diagnostic symptom.

Create an Asset Diagnostic Symptom

In this scenario, you create an asset diagnostic symptom for an existing work order. This type of scenario might occur when an IoT-enabled asset exceeds a temperature threshold that triggers a work order for a technician to inspect the asset, and you want to capture the temperature anomaly code and peak temperature against the work order.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetDiagnosticSymptoms"

Example Request

This table shows the typical attributes to create an asset diagnostic symptom:

Table -

Value Description
CaptureObjectTypeCode Indicates the entity to which the asset diagnostic symptom is linked. Currently, the only valid value is ORA_WORK_ORDER.

This value is mandatory.

CaptureObjectId Unique system-generated value for the entity referenced by CaptureObjectTypeCode. Currently, the only valid value is a WorkOrderId.

It's mandatory to pass either the CaptureObjectId or both the WorkOrderNumber and Organization (either OrganizationId or OrganizationCode).

WorkOrderNumber Unique identifier for a work order within an organization.

It's mandatory to pass either the CaptureObjectId or both the WorkOrderNumber and Organization (either OrganizationId or OrganizationCode).

OrganizationId Unique system-generated value for an organization. When passing WorkOrderNumber, either OrganizationId or OrganizationCode must be passed with it.
OrganizationCode Unique alphanumeric code that denotes an organization. When passing WorkOrderNumber, either OrganizationId or OrganizationCode must be passed with it.
DiagnosticCode Abbreviation that uniquely identifies an anomalous event, state, or measurement.

The diagnostic code is mandatory for creating an asset diagnostic symptom. A diagnostic code is a condition event with a ConditionEventTypeCode of DIAGNOSTIC.

Comments Free-text field that can capture additional information such as technician notes, sensor readings, or machine-learning recommendations.

This field is not mandatory.

Here's an example of the request body in JSON format.
{
    "CaptureObjectTypeCode":"ORA_WORK_ORDER",
    "CaptureObjectId":300100118613665,
    "DiagnosticCode":"HIGH_TEMP",
    "Comments":"Peak Temperature = 32C; Threshold Temperature = 30C."
}

Example Response

Here's an example of the response body in JSON format.

{
    "SymptomId": 300100556105700,
    "DiagnosticCodeId": 300100556105648,
    "CaptureObjectId": 300100118613665,
    "CaptureObjectTypeCode": "ORA_WORK_ORDER",
    "CaptureObjectTypeName": null,
    "Comments":"Peak Temperature = 32C; Threshold Temperature = 30C.",
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-17T12:09:56.726+00:00",
    "LastUpdateDate": "2022-01-17T12:09:56.726+00:00",
    "LastUpdateLogin": "D5C58C8ACA3C30AFE053D45AF00A9878",
    "LastUpdatedBy": "MNT_QA",
    "ActiveEndDate": null,
    "DiagnosticCode": null,
    "DiagnosticCodeCategoryName": null,
    "DiagnosticCodeDescription": null,
    "DiagnosticCodeName": "HIGH_TEMP",
    "DiagnosticCodeCategoryCode": null,
    "OrganizationId": 300100113363336,
    "WorkOrderNumber": "0554S 250717 2243",
    "WorkOrderDescription": null,
    "OrganizationCode": "MNTALM",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetDiagnosticSymptoms/300100556105700",
            "name": "assetDiagnosticSymptoms",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetDiagnosticSymptoms/300100556105700",
            "name": "assetDiagnosticSymptoms",
            "kind": "item"
        }
    ]
}

Update an Existing Asset Diagnostic Symptom

In this scenario, you update an existing asset diagnostic symptom. Note that only the Comments attribute can be updated.

Example URL

Use this resource URL format.

PATCH

curl -u username:password -X PATCH -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetDiagnosticSymptoms/SymptomId"

Example Request

Here's an example of the request body in JSON format.

{
    "Comments":"Peak Temperature = 35C; Threshold Temperature = 30C."
}

Example Response

Here's an example of the response body in JSON format.

{
    "SymptomId": 300100556105700,
    "DiagnosticCodeId": 300100556105648,
    "CaptureObjectId": 300100118613665,
    "CaptureObjectTypeCode": "ORA_WORK_ORDER",
    "CaptureObjectTypeName": null,
    "Comments":"Peak Temperature = 35C; Threshold Temperature = 30C.",
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-17T12:09:56.726+00:00",
    "LastUpdateDate": "2022-01-17T12:09:58.331+00:00",
    "LastUpdateLogin": "D5C58C8ACA3C30AFE053D45AF00A9878",
    "LastUpdatedBy": "MNT_QA",
    "ActiveEndDate": null,
    "DiagnosticCode": null,
    "DiagnosticCodeCategoryName": null,
    "DiagnosticCodeDescription": null,
    "DiagnosticCodeName": null,
    "DiagnosticCodeCategoryCode": null,
    "OrganizationId": 300100113363336,
    "WorkOrderNumber": "0554S 250717 2243",
    "WorkOrderDescription": null,
    "OrganizationCode": "MNTALM",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetDiagnosticSymptoms/300100556105700",
            "name": "assetDiagnosticSymptoms",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetDiagnosticSymptoms/300100556105700",
            "name": "assetDiagnosticSymptoms",
            "kind": "item"
        }
    ]
}

Delete an Existing Asset Diagnostic Symptom

In this scenario, you delete an existing asset diagnostic symptom.

When deleting a symptom, there is neither a request nor response payload, and the response status is 204 No Content.

Example URL

Use this resource URL format.

DELETE

curl -u username:password -X DELETE -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d "https://servername/fscmRestApi/resources/latest/assetDiagnosticSymptoms/SymptomId"