Create duplicates
/fscmRestApi/resources/11.13.18.05/supplyChainPlans/{PlanId}/child/Duplicates
Request
-
PlanId(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.
- application/json
object
-
CopyPlanType: integer
Determines the plan data to copy. Valid values include 1: copy only plan options, 2: copy plan with reference to base plan, or 3: copy all plan data with no reference to base plan. The default value is 2. A list of accepted values is defined in the lookup type ORA_MSC_COPY_PLAN_TYPES.
-
DuplicateStatus: integer
(int32)
Status of the scheduled process that duplicates the plan. Valid values include 0: success, 1: in progress, or 2: error. This attribute doesn't have a default value.
-
EndDate: string
(date-time)
Date and time when the scheduled process finished running.
-
ESSJobId: integer
(int64)
Value that uniquely identifies the scheduled process.
-
ExecutionId: integer
(int64)
Value that uniquely identifies the scheduled process.
-
ExecutionUser: string
Maximum Length:
64
Sign in that the user used when starting the scheduled process. -
IncludeArchives: string
Contains one of the following values: true or false. If true, then include archives when copying plan data without a reference to base plan. If false, then don't copy archives. The default value is false.
-
LoadPlanAfterCopy: string
Contains one of the following values: true or false. If true, then load the plan after the copy finishes. If false, then don't load. The default value is false.
-
Message: string
Text of the error message that occurred when running the scheduled process.
-
NewPlanAccessType: string
Contains one of the following values: 1 or 2. If 1, then the plan is public. If 2, then the plan is private. Only the plan owner or users that the plan references can view a private plan. The default value is 1. A list of accepted values is defined in the lookup type ORA_MSC_ACCESS.
-
NewPlanAccessUsers: string
List of users granted access to the new plan that the duplication process created. A comma separates each value.
-
NewPlanDescription: string
Description of the new plan that the duplication process creates.
-
NewPlanId: integer
Value that uniquely identifies the new plan that the duplication process creates.
-
NewPlanLimitedAccessUsers: string
Maximum Length:
255
List of users granted restricted access to a plan that the duplication process created. A comma separates each value. -
NewPlanName: string
Name of the new plan that the duplication process creates.
-
NewPlanOwner: string
Owner of the new plan that the duplication process creates.
-
PlanAction: integer
Plan action that calls the scheduled process. Value for duplicate action is 4: duplicate.
-
PlanId: integer
Value that uniquely identifies the plan.
-
StartDate: string
(date-time)
Date and time when the scheduled process started to run.
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
-
CopyPlanType: integer
Determines the plan data to copy. Valid values include 1: copy only plan options, 2: copy plan with reference to base plan, or 3: copy all plan data with no reference to base plan. The default value is 2. A list of accepted values is defined in the lookup type ORA_MSC_COPY_PLAN_TYPES.
-
DuplicateStatus: integer
(int32)
Status of the scheduled process that duplicates the plan. Valid values include 0: success, 1: in progress, or 2: error. This attribute doesn't have a default value.
-
EndDate: string
(date-time)
Date and time when the scheduled process finished running.
-
ESSJobId: integer
(int64)
Value that uniquely identifies the scheduled process.
-
ExecutionId: integer
(int64)
Value that uniquely identifies the scheduled process.
-
ExecutionUser: string
Maximum Length:
64
Sign in that the user used when starting the scheduled process. -
IncludeArchives: string
Contains one of the following values: true or false. If true, then include archives when copying plan data without a reference to base plan. If false, then don't copy archives. The default value is false.
-
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
LoadPlanAfterCopy: string
Contains one of the following values: true or false. If true, then load the plan after the copy finishes. If false, then don't load. The default value is false.
-
Message: string
Text of the error message that occurred when running the scheduled process.
-
NewPlanAccessType: string
Contains one of the following values: 1 or 2. If 1, then the plan is public. If 2, then the plan is private. Only the plan owner or users that the plan references can view a private plan. The default value is 1. A list of accepted values is defined in the lookup type ORA_MSC_ACCESS.
-
NewPlanAccessUsers: string
List of users granted access to the new plan that the duplication process created. A comma separates each value.
-
NewPlanDescription: string
Description of the new plan that the duplication process creates.
-
NewPlanId: integer
Value that uniquely identifies the new plan that the duplication process creates.
-
NewPlanLimitedAccessUsers: string
Maximum Length:
255
List of users granted restricted access to a plan that the duplication process created. A comma separates each value. -
NewPlanName: string
Name of the new plan that the duplication process creates.
-
NewPlanOwner: string
Owner of the new plan that the duplication process creates.
-
PlanAction: integer
Plan action that calls the scheduled process. Value for duplicate action is 4: duplicate.
-
PlanId: integer
Value that uniquely identifies the plan.
-
StartDate: string
(date-time)
Date and time when the scheduled process started to run.
array
Links
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.
Examples
This example describes how to copy from an existing plan.
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/supplyChainPlans/PlanId/child/Duplicates"
Example 1 cURL Command
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100119154788/child/Duplicates"
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.
{ "NewPlanOwner": "APS_ALL", "NewPlanAccessType": 1, "CopyPlanType": 1, "LoadPlanAfterCopy": 1, "NewPlanName": "TestDuplicateRestServ", "NewPlanDescription": "test duplicate rest service", "IncludeArchives": 1 }
Example 1 Response Body
The following example includes the contents of the response body in JSON format:
{ "PlanId": 300100119154788, "ExecutionId": 300100191605148, "DuplicateStatus": null, "ESSJobId": null, "StartDate": null, "EndDate": null, "ExecutionUser": "OPERATIONS", "PlanAction": 4, "NewPlanName": "TestDuplicateRestServ11", "NewPlanDescription": "test duplicate rest service", "NewPlanOwner": "APS_ALL", "NewPlanAccessType": "1", "NewPlanAccessUsers": "", "NewPlanId": 300100191605149, "CopyPlanType": 1, "LoadPlanAfterCopy": "", "Message": "", "IncludeArchives": "1", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100119154788/child/Duplicates/300100191605148", "name": "Duplicates", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100119154788/child/Duplicates/300100191605148", "name": "Duplicates", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100119154788", "name": "supplyChainPlans", "kind": "item" } ] }
Example 2 cURL Command
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100181776218/child/Duplicates"
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.
{ "NewPlanOwner": "APS_ALL", "NewPlanAccessType": 2, "CopyPlanType": 1, "LoadPlanAfterCopy": 1, "NewPlanName": "DEMO TEST PLAN1", "NewPlanDescription": "test duplicate rest service with full & limited access users", "IncludeArchives": 1, "NewPlanAccessUsers": "SCMOPERATIONS", "NewPlanLimitedAccessUsers": "SCP_SP_USER,SCP_PC_USER" }
Example 2 Response Body
The following example includes the contents of the response body in JSON format:
{ "PlanId": 300100181776218, "ExecutionId": 300100583590880, "DuplicateStatus": null, "ESSJobId": null, "StartDate": null, "EndDate": null, "ExecutionUser": "APS_ALL", "PlanAction": 4, "NewPlanName": "DEMO TEST PLAN1", "NewPlanDescription": "test duplicate rest service with full & limited access users", "NewPlanOwner": "APS_ALL", "NewPlanAccessType": "2", "NewPlanAccessUsers": "APS_ALL,SCMOPERATIONS", "NewPlanId": 300100583590881, "CopyPlanType": 1, "LoadPlanAfterCopy": "", "Message": "", "IncludeArchives": "1", "NewPlanLimitedAccessUsers": "SCP_SP_USER,SCP_PC_USER", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100181776218/child/Duplicates/300100583590880", "name": "Duplicates", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100181776218/child/Duplicates/300100583590880", "name": "Duplicates", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/supplyChainPlans/300100181776218", "name": "supplyChainPlans", "kind": "item" } ] }