Get all affected assets

get

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

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.
Query Parameters
  • 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>
  • 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).
  • 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
  • Used as a predefined finder to search the collection.

    Format: ?finder=<finderName>;<variableName>=<variableValue>,<variableName2>=<variableValue2>

    The following are the available finder names and corresponding finder variables:

    • PrimaryKey: Finds affected assets according to the asset identifier.
      Finder Variables:
      • AssetId; integer; Value that uniquely identifies the affected asset.
  • This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
  • 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
  • Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
  • The resource item payload will be filtered in order to contain only data (no links section, for example).
  • This parameter orders a resource collection based on the specified fields. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. The default value is "asc". For example, ?orderBy=field1:asc,field2:desc
  • This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;Loc!=NY

    Format: ?q=expression1;expression2

    You can use these queryable attributes to filter this collection resource using the q query parameter:
    • AllowWorkOrdersFlag; boolean; 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.
    • AssetDescription; string; Description of the asset in a work requirement. This value can't be updated,.
    • AssetId; integer; Value that uniquely identifies the asset in a work requirement This value can't be updated,.
    • AssetNumber; string; Number that uniquely identifies the asset in a work requirement. This value can't be updated,.
    • AssetStatusCode; string; 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.
    • CreateWorkOrderOption; string; Name that identifies if work orders will be automatically or manually created for the work requirement. This value is read-only.
    • CreateWorkOrderOptionCode; string; 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.
    • ForecastStartDate; string; Date when the work requirement begins forecasting the asset. This value can be updated after its creation until the first work order is created.
    • HistoricalLastCompleteInterval; number; 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.
    • HistoricalLastCompletedDate; string; 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.
    • MaintenanceOrganization; string; 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.
    • MaintenanceOrganizationId; integer; 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.
    • OperatingOrganization; string; Abbreviation that uniquely identifies the operating organization of the asset. This value is read-only.
    • OperatingOrganizationId; integer; Value that uniquely identifies the operating organization of the asset. This value is read-only.
    • SerialNumber; string; Serial number of the asset in a work requirement. This value can't be updated,.
    • WorkOrdersCreatedFlag; boolean; 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.
  • The resource collection representation will include the "estimated row count" when "?totalResults=true", otherwise the count is not included. The default value is "false".
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.

There's no request body for this operation.

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
Type: object
Show Source
Nested Schema : Items
Type: array
Title: Items
The items in the collection.
Show Source
Nested 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 get all affected assets.

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"

Example Response Body

The following example includes the contents of the response body in JSON format:
{
    "items": [
        {		
			"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"
                }
            ]
        },
	        {		
			"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"
                }
            ]
        }
    ],
    "count": 2,
    "hasMore": false,
    "limit": 25,
    "offset": 0,
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/maintenancePrograms/300100601683585/child/workRequirements/300100601683588/child/affectedAssets",
            "name": "affectedAssets",
            "kind": "collection"
        }
    ]
}
Back to Top