Get and Patch Collaboration Planners
Collaboration planners are Oracle Fusion application users assigned to a security context to access collaboration order forecast data.
Lets consider you create a solution that allows John Brown, a customer, to use a client to connect to your partner application, and then use REST API to get collaboration planners details and patch a collaboration planner details.
Let's discuss these scenarios:
- Get collaboration planners according to a supplier.
- Patch a collaboration planner with Atlanta to Dallas.
Here's a typical application processing flow for the scenarios:
- You configure collaboration planners in Oracle Supply Chain Collaboration Cloud.
- You can view all collaboration planners with access to collaboration order forecast data for your supplier, Big Computers.
- Several collaboration planners have access to the Big Computers's Atlanta site, but the Atlanta site is being shut down. Therefore, all collaboration planners with access to the Atlanta site need their access moved to the Dallas Site.
Get Collaboration Planners According to a Supplier
To get all collaboration planners for a specified supplier:
- Query the collaboration planners for supplier
Big Computers.
Note:
In order to query attribute values for a child resource, you must add the header, REST-Framework-Version: 2 - The response payload includes details that describe the results of the request.
- Your partner application extracts the values for the these attributes from the response payload, and then displays them in the client.
Attribute | Description |
---|---|
collaborationPlanners.UserName | Value that uniquely identifies the collaboration planner to authenticate with the service provider. This is a required attribute. |
collaborationPlanners.Status | Administrative status of the collaboration planner. The service provider determines the value for this attribute. For example, Active indicates that the collaboration planner can access order forecast data. Inactive indicates that the collaboration planner cannot access order forecast data. |
dataAccessSecurity.ShipFromSupplierId | Value that uniquely identifies the supplier who ships the item. It is a primary key that the application creates when it creates the supplier. |
dataAccessSecurity.ShipFromSupplierName | Name of the supplier that ships the item. |
dataAccessSecurity.ShipFromSupplierSiteId | Value that uniquely identifies the supplier site who ships the item. It is a primary key that the application creates when it creates the supplier site. |
dataAccessSecurity.ShipFromSupplierSiteName | Name of the supplier site that ships the item. |
dataAccessSecurity.SecurityContext | Value that identifies the level of security. Value is supplier or supplier site. |
Example URL
Use this resource URL format.
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/collaborationPlanners? q=dataAccessSecurity.ShipFromSupplierName='Big Computers'&q=dataAccessSecurity.ShipFromSupplierSiteName='Atlanta'&expand=dataAccessSecurity&onlyData=True" -H 'REST-Framework-Version: 2' -H 'cache-control: no-cache'
Example Response
Here's an example of the response body in JSON format.
{ "items": [ { "PersonId": 100010026863927, "UserName": "MJohnson", "FirstName": "Mark", "LastName": "Johnson", "DisplayName": "Johnson, Mark", "Email": "sendmail-test-discard@example.com", "Status": "Active", "CreatedBy": "ADMIN", "CreationDate": "2017-07-21T06:32:35.639+00:00", "LastUpdatedBy": "ADMIN", "LastUpdateDate": "2017-07-21T06:38:18.315+00:00", "FullAccessFlag": "false", "dataAccessSecurity": [ { "DataAccessId": 300100124837752, "SecurityContext": "Supplier Site", "ShipFromSupplierId": 1717, "ShipFromSupplierName": "Big Computers", "ShipFromSupplierSiteId": 4060, "ShipFromSupplierSiteName": "Atlanta", "ProcurementBUId": 204, "ProcurementBUName": "Vision Operations", "CreatedBy": "ADMIN", "CreationDate": "2018-04-09T07:19:38+00:00", "LastUpdatedBy": "ADMIN", "LastUpdateDate": "2018-04-09T07:22:03.804+00:00" } ] }, { "PersonId": 300100073978964, "UserName": "SJones", "FirstName": "Steve", "LastName": "Jones", "DisplayName": "Jones, Steve", "Email": " sendmail-test-discard @example.com", "Status": "Active", "CreatedBy": "ADMIN", "CreationDate": "2017-07-27T01:11:54.238+00:00", "LastUpdatedBy": "ADMIN", "LastUpdateDate": "2017-07-27T01:12:42.943+00:00", "FullAccessFlag": "false", "dataAccessSecurity": [ { "DataAccessId": 300100120934698, "SecurityContext": "Supplier", "ShipFromSupplierId": 415, "ShipFromSupplierName": "Chips R Us", "ShipFromSupplierSiteId": null, "ShipFromSupplierSiteName": null, "ProcurementBUId": null, "ProcurementBUName": null, "CreatedBy": "ADMIN", "CreationDate": "2017-07-27T01:15:26+00:00", "LastUpdatedBy": "ADMIN", "LastUpdateDate": "2017-07-27T01:15:45.683+00:00" }, { "DataAccessId": 300100120934687, "SecurityContext": "Supplier Site", "ShipFromSupplierId": 1717, "ShipFromSupplierName": "Big Computers", "ShipFromSupplierSiteId": 4060, "ShipFromSupplierSiteName": "Atlanta", "ProcurementBUId": 204, "ProcurementBUName": "Vision Operations", "CreatedBy": "ADMIN", "CreationDate": "2017-07-27T01:12:06.202+00:00", "LastUpdatedBy": "ADMIN", "LastUpdateDate": "2017-07-27T01:12:42.944+00:00" } ] } ], "count": 2, "hasMore": false, "limit": 25, "offset": 0, "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationPlanners", "name": "collaborationPlanners", "kind": "collection" } ] }
Patch an Existing Planner with New Attributes
- Query (GET) the collaboration planner and
identify planner to be updated by using query parameters:
curl -u username:password "https://servername/fscmRestApi/resources/version/collaborationPlanners? q=dataAccessSecurity.ShipFromSupplierName='Big Computers'&q=dataAccessSecurity.ShipFromSupplierSiteName='Atlanta'&expand=dataAccessSecurity&onlyData=True"
- Run the PATCH operation against the URL to update a single collaboration planner using the keys ShipFromSupplierName and ShipFromSupplierSiteName.
- The response payload includes details that describe the results of the request.
- Your partner application extracts the values for these attributes from the response payload, and then displays them in the client.
Attribute | Description |
---|---|
ShipFromSupplierName | Name of the supplier that ships the item. |
ShipFromSupplierSiteName | Name of the supplier site that ships the item. |
Example URL
Use this resource URL format.
PATCH
curl -X PATCH -u "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/collaborationPlanners/100010026863927/child/dataAccessSecurity/300100120934687"
Example Request
Here's an example of the request body in JSON format.
{ "ShipFromSupplierName" : "Big Computers" "ShipFromSupplierSiteName" : "Dallas"
Example Response
Here's an example of the response body in JSON format.
{ "DataAccessId": 300100120934687, "SecurityContext": "Supplier Site", "ShipFromSupplierId": 1717, "ShipFromSupplierName": "Big Computers", "ShipFromSupplierSiteId": 4061, "ShipFromSupplierSiteName": "Dallas", "ProcurementBUId": 204, "ProcurementBUName": "Vision Operations", "CreatedBy": "ADMIN", "CreationDate": "2018-04-18T19:47:04.585+00:00", "LastUpdatedBy": "ADMIN", "LastUpdateDate": "2018-04-19T14:59:07.277+00:00", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/collaborationPlanners/100010026863927/child/dataAccessSecurity/300100120934687", "name": "dataAccessSecurity", "kind": "item", "properties": { "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278" } }, { "rel": "canonical", "href": " https://servername/fscmRestApi/resources/version/collaborationPlanners/100010026863927/child/dataAccessSecurity/300100120934687", "name": "dataAccessSecurity", "kind": "item" }, { "rel": "parent", "href": " https://servername/fscmRestApi/resources/version/collaborationPlanners/100010026863927", "name": "collaborationPlanners", "kind": "item" } ] }