Create resources
/fscmRestApi/resources/11.13.18.05/simulationSets/{SimulationSetId}/child/Resources
Request
-
SimulationSetId(required): integer(int64)
The value of this parameter could be a hash of the key that is used to uniquely identify the resource item. The client should not generate the hash key value. Instead, the client should query on the collection resource with a filter to navigate to a specific resource item. For example: products?q=InventoryItemId=
-
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.
-
Upsert-Mode:
Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
- application/json
object
-
AvailableAllDayIndicator(required): integer
Value that indicates whether the resource is available 24 hours a day or not. Valid values are: 1 or 2. If 1, then resource is available 24 hours a day. If 2, then not.
-
BottleneckIndicator: integer
Value that indicates whether the resource is a bottleneck resource or not. Valid values are: 1 or 2. If 1, then resource is a bottleneck. If 2, then not.
-
CapacityUnits: number
Number of units of the resource that are available.
-
Critical: integer
Value that indicates whether the resource is critical to honor resource capacity constraint or not. Valid values are: 1 or 2. If 1, then the resource is critical. If 2, then the resource isn't critical.
-
DisableDate: string
(date)
Date when the resource is no longer available.
-
EfficiencyPercent: number
Percentage of the actual output compared to the expected standard output.
-
Organization: string
Maximum Length:
4000
Abbreviation that identifies the organization. -
OrganizationId(required): integer
(int64)
Value that uniquely identifies the organization.
-
ResourceCapacities: array
Resource Capacities
Title:
Resource Capacities
The Resource Capacities resource manages how many hours a resource is available for each day within a simulation set. -
ResourceCode: string
Maximum Length:
40
Abbreviation that identifies the resource. -
ResourceCost: number
Cost associated with using the resource.
-
ResourceDescription: string
Maximum Length:
240
Description of the resource. -
ResourceId(required): integer
(int64)
Value that uniquely identifies the resource.
-
ResourceName: string
Maximum Length:
80
Name of the resource. -
ResourceType: integer
Value that identifies the type of resource. Valid values are 1 or 2. If 1, then the resource is a piece of equipment. If 2, then the resource is a crew. A list of accepted values is defined in the lookup type ORA_MSC_RESOURCE_TYPE.
-
ResourceUOM: string
Maximum Length:
3
Unit of measure associated with the resource. -
UtilizationPercent: number
Percentage of how much a resource is utilized.
-
WorkAreaCode: string
Maximum Length:
120
Abbreviation that identifies the work area. -
WorkAreaDescription: string
Maximum Length:
240
Description of the work area. -
WorkAreaId: integer
(int64)
Value that uniquely identifies the work area.
-
WorkAreaName: string
Maximum Length:
80
Name of the work area. -
WorkCenterCode: string
Maximum Length:
120
Abbreviation that identifies the work center. -
WorkCenterDescription: string
Maximum Length:
240
Description of the work center. -
WorkCenterId(required): integer
(int64)
Value that uniquely identifies the work center.
-
WorkCenterName: string
Maximum Length:
80
Name of the work center.
array
Resource Capacities
object
-
AvailabilityDate: string
(date)
Date when the resource capacity is available.
-
DailyAvailability: number
Daily availability for each capacity unit of the resource.
Response
- application/json
Default Response
-
Metadata-Context(required):
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(required):
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.
object
-
AvailableAllDayIndicator: integer
Value that indicates whether the resource is available 24 hours a day or not. Valid values are: 1 or 2. If 1, then resource is available 24 hours a day. If 2, then not.
-
BottleneckIndicator: integer
Value that indicates whether the resource is a bottleneck resource or not. Valid values are: 1 or 2. If 1, then resource is a bottleneck. If 2, then not.
-
CapacityUnits: number
Number of units of the resource that are available.
-
CreatedBy: string
Read Only:
true
Maximum Length:64
User who created the resource. -
CreationDate: string
(date-time)
Read Only:
true
Date and time when the user created the resource. -
Critical: integer
Value that indicates whether the resource is critical to honor resource capacity constraint or not. Valid values are: 1 or 2. If 1, then the resource is critical. If 2, then the resource isn't critical.
-
DisableDate: string
(date)
Date when the resource is no longer available.
-
EfficiencyPercent: number
Percentage of the actual output compared to the expected standard output.
-
LastUpdateDate: string
(date-time)
Read Only:
true
Date and time when the user most recently updated the resource. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
User who most recently updated the resource. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
Organization: string
Maximum Length:
4000
Abbreviation that identifies the organization. -
OrganizationId: integer
(int64)
Value that uniquely identifies the organization.
-
ResourceCapacities: array
Resource Capacities
Title:
Resource Capacities
The Resource Capacities resource manages how many hours a resource is available for each day within a simulation set. -
ResourceCode: string
Maximum Length:
40
Abbreviation that identifies the resource. -
ResourceCost: number
Cost associated with using the resource.
-
ResourceDescription: string
Maximum Length:
240
Description of the resource. -
ResourceId: integer
(int64)
Value that uniquely identifies the resource.
-
ResourceName: string
Maximum Length:
80
Name of the resource. -
ResourceType: integer
Value that identifies the type of resource. Valid values are 1 or 2. If 1, then the resource is a piece of equipment. If 2, then the resource is a crew. A list of accepted values is defined in the lookup type ORA_MSC_RESOURCE_TYPE.
-
ResourceUOM: string
Maximum Length:
3
Unit of measure associated with the resource. -
UtilizationPercent: number
Percentage of how much a resource is utilized.
-
WorkAreaCode: string
Maximum Length:
120
Abbreviation that identifies the work area. -
WorkAreaDescription: string
Maximum Length:
240
Description of the work area. -
WorkAreaId: integer
(int64)
Value that uniquely identifies the work area.
-
WorkAreaName: string
Maximum Length:
80
Name of the work area. -
WorkCenterCode: string
Maximum Length:
120
Abbreviation that identifies the work center. -
WorkCenterDescription: string
Maximum Length:
240
Description of the work center. -
WorkCenterId: integer
(int64)
Value that uniquely identifies the work center.
-
WorkCenterName: string
Maximum Length:
80
Name of the work center.
array
Links
array
Resource Capacities
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
object
-
AvailabilityDate: string
(date)
Date when the resource capacity is available.
-
CreatedBy: string
Read Only:
true
Maximum Length:64
User who created the resource capacity. -
CreationDate: string
(date-time)
Read Only:
true
Date and time when the user created the resource capacity. -
DailyAvailability: number
Daily availability for each capacity unit of the resource.
-
LastUpdateDate: string
(date-time)
Read Only:
true
Date and time when the user most recently updated the resource capacity. -
LastUpdatedBy: string
Read Only:
true
Maximum Length:64
User who most recently updated the resource capacity. -
links: array
Links
Title:
Links
The link relations associated with the resource instance.
array
Links
- ResourceCapacities
-
Parameters:
- ResourceId:
$request.path.ResourceId
- SimulationSetId:
$request.path.SimulationSetId
The Resource Capacities resource manages how many hours a resource is available for each day within a simulation set. - ResourceId:
Examples
This example describes how to create resources.
Example cURL Command
Use the following cURL command to submit a request on the REST resource.
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554/child/Resources"
Example 1 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 creates.
{ "ResourceId" : 10904, "BottleneckIndicator": 2, "EfficiencyPercent": 100, "UtilizationPercent": 20, "AvailableAllDayIndicator": 1 }
Example 1 Response Body
The following example includes the contents of the response body in JSON format:
{ "ResourceId": 10904, "ResourceCode": "MFGADHOCLAB-C", "ResourceName": "MFGADHOCLAB-Costed", "ResourceDescription": "Adhoc Labour-Costed", "WorkCenterId": 300100073217933, "WorkCenterCode": "MFGQA2", "WorkCenterName": "MFGQA2", "WorkCenterDescription": "Work Center for QA", "WorkAreaId": 300100073217896, "WorkAreaCode": "MFGASSYWA2", "WorkAreaName": "MFGASSYWA2", "WorkAreaDescription": "Assembly Work Area2", "OrganizationId": 10000, "Organization": "V1", "ResourceType": 2, "ResourceUOM": "HRS", "CapacityUnits": 10, "BottleneckIndicator": 2, "EfficiencyPercent": 100, "UtilizationPercent": 20, "ResourceCost": null, "AvailableAllDayIndicator": 1, "DisableDate": null, "CreatedBy": "APS_ALL", "CreationDate": "2020-12-16T17:04:55.672+00:00", "LastUpdatedBy": "APS_ALL", "LastUpdateDate": "2020-12-16T17:04:55.049+00:00", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554/child/Resources/10904", "name": "Resources", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000017704000000017372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C78" } }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554/child/Resources/10904", "name": "Resources", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554", "name": "simulationSets", "kind": "item" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554/child/Resources/10904/child/ResourceCapacities", "name": "ResourceCapacities", "kind": "collection" } ] }
Example 2 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 creates.
{ "ResourceCode": "MFGADHOCLAB-NC", "WorkCenterCode": "MFGQA2", "Organization": "V1", "EfficiencyPercent": 100 }
Example 2 Response Body
The following example includes the contents of the response body in JSON format:
{ "ResourceId": 10904, "ResourceCode": "MFGADHOCLAB-C", "ResourceName": "MFGADHOCLAB-Costed", "ResourceDescription": "Adhoc Labour-Costed", "WorkCenterId": 300100073217933, "WorkCenterCode": "MFGQA2", "WorkCenterName": "MFGQA2", "WorkCenterDescription": "Work Center for QA", "WorkAreaId": 300100073217896, "WorkAreaCode": "MFGASSYWA2", "WorkAreaName": "MFGASSYWA2", "WorkAreaDescription": "Assembly Work Area2", "OrganizationId": 10000, "Organization": "V1", "ResourceType": 2, "ResourceUOM": "HRS", "CapacityUnits": 10, "BottleneckIndicator": 2, "EfficiencyPercent": 100, "UtilizationPercent": 20, "ResourceCost": null, "AvailableAllDayIndicator": 1, "DisableDate": null, "CreatedBy": "APS_ALL", "CreationDate": "2020-12-16T17:04:55.672+00:00", "LastUpdatedBy": "APS_ALL", "LastUpdateDate": "2020-12-16T17:04:55.049+00:00", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554/child/Resources/10904", "name": "Resources", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000017704000000017372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C78" } }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554/child/Resources/10904", "name": "Resources", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554", "name": "simulationSets", "kind": "item" }, { "rel": "child", "href": "https://servername/fscmRestApi/resources/version/simulationSets/300100544099554/child/Resources/10904/child/ResourceCapacities", "name": "ResourceCapacities", "kind": "collection" } ] }