Update one affected asset

patch

/fscmRestApi/resources/11.13.18.05/maintenancePrograms/{MaintenanceProgramId}/child/workRequirements/{WorkRequirementId}/child/affectedAssets/{affectedAssetsUniqID}

Request

Path Parameters
  • Value that uniquely identifies a maintenance program. The application generates this value and is referenced during retrieval and update of a maintenance program definition. This value can't be updated after its creation.
  • Value that uniquely identifies the work requirement. The application generates this value when it creates a new requirement. This value is referenced during retrieval and update of a work requirement. This value can't be updated after its creation.
  • This is the hash key of the attributes which make up the composite key for the Affected Assets resource and used to uniquely identify an instance of Affected Assets. The client should not generate the hash key value. Instead, the client should query on the Affected Assets collection resource in order to navigate to a specific instance of Affected Assets to get the hash key.
Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
  • Title: Asset Status Code
    Maximum Length: 11
    Abbreviation that specifies if an asset is included or excluded from the forecast in a work requirement. Valid values are ORA_INCLUDE or ORA_EXCLUDE as defined in the lookup ORA_MNT_AFF_ASSET_STATUS. The code can be updated.
  • Title: Create Work Orders Option Code
    Maximum Length: 30
    Abbreviation that identifies if work orders will be automatically or manually created for the affected asset. Valid values are ORA_AUTOMATIC and ORA_MANUALLY as defined in the lookup ORA_MNT_MX_PROGRAM_WO_CREATE. The default value is Automatic and the code can be updated.
  • Title: Forecasted Start Date
    Date when the work requirement begins forecasting the asset. This value can be updated after its creation until the first work order is created.
  • Title: Historical Last Completed Date
    Historical date of accomplishment of the work requirement from an external system. This value can be updated after its creation until the first work order is created.
  • Title: Historical Last Completed Interval
    Historical cycle interval of accomplishment of the work requirement from an external system. This value can be updated after its creation until the first work order is created.
  • Title: Maintenance Organization
    Value that uniquely identifies the operating organization of the asset. The value may be the same as the operating organization or may be another maintenance-enabled organization. This value is read-only.
  • Title: Operating Organization ID
    Value that uniquely identifies the operating organization of the asset. This value is read-only.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : maintenancePrograms-workRequirements-affectedAssets-item-response
Type: object
Show Source
  • Title: Allow Work Orders
    Read Only: true
    Maximum Length: 1
    Contains one of the following values: true or false. If true, then work orders are allowed to be created for the applicable asset in the work requirement. If false, then work orders can't be created for the applicable asset. The default value is false. This value can't be updated.
  • Title: Asset Description
    Read Only: true
    Maximum Length: 240
    Description of the asset in a work requirement. This value can't be updated,.
  • Title: Asset ID
    Value that uniquely identifies the asset in a work requirement This value can't be updated,.
  • Title: Asset Number
    Maximum Length: 80
    Number that uniquely identifies the asset in a work requirement. This value can't be updated,.
  • Title: Asset Status
    Read Only: true
    Maximum Length: 80
    Meaning of the asset status code. This value can't be updated.
  • Title: Asset Status Code
    Maximum Length: 11
    Abbreviation that specifies if an asset is included or excluded from the forecast in a work requirement. Valid values are ORA_INCLUDE or ORA_EXCLUDE as defined in the lookup ORA_MNT_AFF_ASSET_STATUS. The code can be updated.
  • Title: Create Work Orders Option
    Read Only: true
    Maximum Length: 80
    Name that identifies if work orders will be automatically or manually created for the work requirement. This value is read-only.
  • Title: Create Work Orders Option Code
    Maximum Length: 30
    Abbreviation that identifies if work orders will be automatically or manually created for the affected asset. Valid values are ORA_AUTOMATIC and ORA_MANUALLY as defined in the lookup ORA_MNT_MX_PROGRAM_WO_CREATE. The default value is Automatic and the code can be updated.
  • Title: Forecasted Start Date
    Date when the work requirement begins forecasting the asset. This value can be updated after its creation until the first work order is created.
  • Title: Historical Last Completed Date
    Historical date of accomplishment of the work requirement from an external system. This value can be updated after its creation until the first work order is created.
  • Title: Historical Last Completed Interval
    Historical cycle interval of accomplishment of the work requirement from an external system. This value can be updated after its creation until the first work order is created.
  • Links
  • Title: Maintenance Organization
    Read Only: true
    Maximum Length: 18
    Abbreviation that uniquely identifies the operating organization of the asset. The value may be the same as the operating organization or may be another maintenance-enabled organization. This value is read-only.
  • Title: Maintenance Organization
    Value that uniquely identifies the operating organization of the asset. The value may be the same as the operating organization or may be another maintenance-enabled organization. This value is read-only.
  • Title: Operating Organization
    Read Only: true
    Maximum Length: 18
    Abbreviation that uniquely identifies the operating organization of the asset. This value is read-only.
  • Title: Operating Organization ID
    Value that uniquely identifies the operating organization of the asset. This value is read-only.
  • Title: Serial Number
    Read Only: true
    Maximum Length: 80
    Serial number of the asset in a work requirement. This value can't be updated,.
  • Title: Work Orders Created
    Read Only: true
    Maximum Length: 1
    Contains one of the following values: true or false. If true, then work orders for the work requirement exist. If false, then work orders for the work requirements haven't been created yet. The default value is false. This value can't be updated.
Back to Top

Examples

This example describes how to update one affected asset.

Example cURL Command

Use the following cURL command to submit a request on the REST resource.

curl -X PATCH -u "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload'  "https://servername/fscmRestApi/resources/version/maintenancePrograms/MaintenanceProgramId/child/workRequirements/WorkRequirementId/child/affectedAssets/affectedAssetsUniqID"

Example Request Body

The following example includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it updates.

{
"AssetStatusCode": "ORA_EXCLUDE"
}

Example Response Body

The following example includes the contents of the response body in JSON format:
{
	"AssetNumber": "ASSET_002",
	"AssetDescription": "ASSET_002 DESC",
	"SerialNumber": "ASSET_002_SN102",
	"AllowWorkOrdersFlag": true,
	"WorkOrdersCreatedFlag": null,
	"AssetStatusCode": "ORA_EXCLUDE",
	"AssetStatus": "Excluded",
	"HistoricalLastCompletedDate": null,
	"HistoricalLastCompleteInterval": null
	"ForecastStartDate": null,
	"CreateWorkOrderOptionCode": "ORA_AUTOMATIC",
	"CreateWorkOrderOption": "Automatically",
	"OperatingOrganizationId": 123456789101112,
	"OperatingOrganization": "OPS_ORG_A",
	"MaintenanceOrganizationId": 123456789101112,
	"MaintenanceOrganization": "OPS_ORG_A",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/maintenancePrograms/300100601683585/child/workRequirements/300100601683588/child/affectedAssets/00020000000EACED00057708000110F09DC2AF670000000EACED00057708000110F09DC29E84",
            "name": "affectedAssets",
            "kind": "item"
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/maintenancePrograms/300100601683585/child/workRequirements/300100601683588/child/affectedAssets/00020000000EACED00057708000110F09DC2AF670000000EACED00057708000110F09DC29E84",
            "name": "affectedAssets",
            "kind": "item"
        },
        {
            "rel": "parent",
            "href": "https://servername/fscmRestApi/resources/version/maintenancePrograms/300100601683585/child/workRequirements/300100601683588",
            "name": "workRequirements",
            "kind": "item"
        }
    ]
}
Back to Top