Get one affected asset
get
/fscmRestApi/resources/11.13.18.05/maintenancePrograms/{MaintenanceProgramId}/child/workRequirements/{WorkRequirementId}/child/affectedAssets/{affectedAssetsUniqID}
Request
Path Parameters
-
MaintenanceProgramId(required): integer(int64)
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.
-
WorkRequirementId(required): integer(int64)
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.
-
affectedAssetsUniqID(required): string
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.
Query Parameters
-
dependency: string
This parameter specifies dependencies which are fields that are set before and rolled back after generating the response. Generally they are used to preview the effects of an attribute change. The fields specified in this parameter are always set in the resource instance in question. When a child resource collection is requested and the parameter is set, the fields will be set in the parent resource instance before generating the resource collection payload. The value of this query parameter is a set of dependency fields. Example: dependency=ProductId=2
Format: <attr1>=<val1>,<attr2>=<value2> -
expand: string
When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". More than one child can be specified using comma as a separator. Example: ?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers).
-
fields: string
This parameter filters the resource fields. Only the specified fields are returned, which means that if no fields are specified, no fields are returned (useful to get only the links). If an indirect child resource is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?fields=Employees.Managers:Empname" is the same as "?fields=;Employees:;Employees.Managers:Empname" (which will only return the "Empname" field for Managers). the value of this query parameter is a list of resource fields. The attribute can be a direct (Example: Employees) or indirect (Example: Employees.Managers) child. It cannot be combined with expand query parameter. If both are provided, only fields will be considered.
Format: ?fields=Attribute1,Attribute2
Format for fields in child resource: ?fields=Accessor1:Attribute1,Attribute2 -
links: string
This parameter can be used to show only certain links while accessing a singular resource or a resource collection. The parameter value format is a comma-separated list of : <link_relation>
Example:
self,canonical -
onlyData: boolean
The resource item payload will be filtered in order to contain only data (no links section, for example).
Header Parameters
-
Metadata-Context:
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".
-
REST-Framework-Version:
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.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
Metadata-Context:
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".
-
REST-Framework-Version:
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.
Root Schema : maintenancePrograms-workRequirements-affectedAssets-item-response
Type:
Show Source
object-
AllowWorkOrdersFlag: boolean
Title:
Allow Work OrdersRead Only:trueMaximum Length:1Contains 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. -
AssetDescription: string
Title:
Asset DescriptionRead Only:trueMaximum Length:240Description of the asset in a work requirement. This value can't be updated,. -
AssetId: integer
(int64)
Title:
Asset IDValue that uniquely identifies the asset in a work requirement This value can't be updated,. -
AssetNumber: string
Title:
Asset NumberMaximum Length:80Number that uniquely identifies the asset in a work requirement. This value can't be updated,. -
AssetStatus: string
Title:
Asset StatusRead Only:trueMaximum Length:80Meaning of the asset status code. This value can't be updated. -
AssetStatusCode: string
Title:
Asset Status CodeMaximum Length:11Abbreviation 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. -
CreateWorkOrderOption: string
Title:
Create Work Orders OptionRead Only:trueMaximum Length:80Name that identifies if work orders will be automatically or manually created for the work requirement. This value is read-only. -
CreateWorkOrderOptionCode: string
Title:
Create Work Orders Option CodeMaximum Length:30Abbreviation 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. -
ForecastStartDate: string
(date)
Title:
Forecasted Start DateDate when the work requirement begins forecasting the asset. This value can be updated after its creation until the first work order is created. -
HistoricalLastCompletedDate: string
(date)
Title:
Historical Last Completed DateHistorical 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. -
HistoricalLastCompleteInterval: number
Title:
Historical Last Completed IntervalHistorical 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: array
Links
Title:
LinksThe link relations associated with the resource instance. -
MaintenanceOrganization: string
Title:
Maintenance OrganizationRead Only:trueMaximum Length:18Abbreviation 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. -
MaintenanceOrganizationId: integer
(int64)
Title:
Maintenance OrganizationValue 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. -
OperatingOrganization: string
Title:
Operating OrganizationRead Only:trueMaximum Length:18Abbreviation that uniquely identifies the operating organization of the asset. This value is read-only. -
OperatingOrganizationId: integer
(int64)
Title:
Operating Organization IDValue that uniquely identifies the operating organization of the asset. This value is read-only. -
SerialNumber: string
Title:
Serial NumberRead Only:trueMaximum Length:80Serial number of the asset in a work requirement. This value can't be updated,. -
WorkOrdersCreatedFlag: boolean
Title:
Work Orders CreatedRead Only:trueMaximum Length:1Contains 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.
Nested Schema : Links
Type:
arrayTitle:
LinksThe link relations associated with the resource instance.
Show Source
Nested Schema : link
Type:
Show Source
object-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]The name of the relation to the resource instance. Example: self.
Nested Schema : properties
Type:
Show Source
object-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
This example describes how to get one affected asset.
Example cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -u username:password "https://servername/fscmRestApi/resources/version/maintenancePrograms/MaintenanceProgramId/child/workRequirements/WorkRequirementId/child/affectedAssets/affectedAssetsUniqID"
Example Response Body
The following example includes the contents of the response body
in JSON format:
{
"AssetId": 9876543210,
"AssetNumber": "ASSET_001",
"AssetDescription": "ASSET_001 DESC",
"SerialNumber": "ASSET_001_SN100",
"AllowWorkOrdersFlag": true,
"WorkOrdersCreatedFlag": null,
"AssetStatusCode": "ORA_INCLUDE",
"AssetStatus": "Included",
"HistoricalLastCompletedDate": "2022-06-01",
"HistoricalLastCompleteInterval": 1,
"ForecastStartDate": "2022-06-01",
"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"
}
]
}