Create duplicates

post

/fscmRestApi/resources/11.13.18.05/supplyChainPlans/{PlanId}/child/Duplicates

Request

Path Parameters
  • 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=
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
  • 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.
  • 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.
  • Date and time when the scheduled process finished running.
  • Value that uniquely identifies the scheduled process.
  • Value that uniquely identifies the scheduled process.
  • Maximum Length: 64
    Sign in that the user used when starting the scheduled process.
  • 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.
  • 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.
  • Text of the error message that occurred when running the scheduled process.
  • 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.
  • List of users granted access to the new plan that the duplication process created. A comma separates each value.
  • Description of the new plan that the duplication process creates.
  • Value that uniquely identifies the new plan that the duplication process creates.
  • Maximum Length: 255
    List of users granted restricted access to a plan that the duplication process created. A comma separates each value.
  • Name of the new plan that the duplication process creates.
  • Owner of the new plan that the duplication process creates.
  • Plan action that calls the scheduled process. Value for duplicate action is 4: duplicate.
  • Value that uniquely identifies the plan.
  • Date and time when the scheduled process started to run.
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 : supplyChainPlans-Duplicates-item-response
Type: object
Show Source
  • 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.
  • 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.
  • Date and time when the scheduled process finished running.
  • Value that uniquely identifies the scheduled process.
  • Value that uniquely identifies the scheduled process.
  • Maximum Length: 64
    Sign in that the user used when starting the scheduled process.
  • 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
  • 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.
  • Text of the error message that occurred when running the scheduled process.
  • 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.
  • List of users granted access to the new plan that the duplication process created. A comma separates each value.
  • Description of the new plan that the duplication process creates.
  • Value that uniquely identifies the new plan that the duplication process creates.
  • Maximum Length: 255
    List of users granted restricted access to a plan that the duplication process created. A comma separates each value.
  • Name of the new plan that the duplication process creates.
  • Owner of the new plan that the duplication process creates.
  • Plan action that calls the scheduled process. Value for duplicate action is 4: duplicate.
  • Value that uniquely identifies the plan.
  • Date and time when the scheduled process started to run.
Back to Top

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"
	}
	]
}
Back to Top