Representational State Transfer, or REST web services, provide interoperability between computer systems and the web. REST web services enable requesting systems to access and manipulate resources. There are five sets of REST web services used in In-Memory Cost Management Cloud Service including:
Simulations
GPA Plan Interface
Planned Costs
Supply/Demand Interface
Price List Interface
The following table shows the web services included in each set and their available actions:
Set of Web Services | Web Service Name | Action Grants |
---|---|---|
Simulations | Simulations | Describe Get |
GPA Plan Interface | GPAPlanInterface | Describe Get Create Update Delete |
GPA Plan Interface | GPAPlanInterfaceErrors | Describe Get |
Planned Costs | PlannedCosts | Describe Get |
Supply/Demand Interface | SupplyDemandInterface | Describe Get Create Update Delete |
Supply/Demand Interface | SupplyDemandInterfaceErrors | Describe Get |
Supply/Demand Interface | SupplyDemand | Describe Get |
Price List Interface | PriceListInterface | Describe Get Create Update Delete |
Price List Interface | PriceListInterfaceErrors | Describe Get |
Price List Interface | PriceList | Describe Get |
The Simulations web service set provides you with view-only (through http GET) simulation data. The simulation data includes all the data generated or related to one or more simulations. In particular, the response from this web service retrieves data in the following tables and organizes it in the hierarchy shown here:
The GPA Plan Interface, set provides you with a tool to populate (http POST), modify (http PUT or PATCH), delete (http DELETE), and query (http GET) data in the cmi_planned_interface interface table used in the profitability analysis module. You can also query the cmi_planned_iface_errors table to help find and correct any issues in the data loaded into the interface table.
The Planned Costs web service provides you with view only plan cost data. The plan cost data includes all the data generated and related to one or more cost plans. In particular, the response from this web service retrieves data in the following tables and organizes it in the hierarchy shown here:
The Supply/Demand Interface web services provides you with a tool to populate, modify, delete, and query data in the supply/demand interface table used in the cost planning module. You can also query the interface errors table to help find and correct any issues in the data loaded into the interface table. After importing the data in the supply/demand interface, you can use the third web service Supply/Demand in this set, to query the data imported.
The Price List Interface web services provides you with a tool to populate, modify, delete, and query data in the price list interface table used in the cost planning module. You can also query the interface errors table to help find and correct any issues in the data loaded into the interface table. After importing the data in the price list interface, you can use the third web service PriceList in this set, to query the data imported.
Related Topics
Consuming the REST Web Services
There are many ways to consume these web services. For example, you can install a REST client extension in the web browser (such as “postman web client” in the Chrome browser, and so forth). You can create and send the http requests in the REST client to consume the listed web services:
The following are the web service URLs which perform these functions:
Returns a list of available versions of web services:
<host>:<port>/IMCMCSREST/rest
Returns the information related to version v1:
<host>:<port>/IMCMCSREST/rest/v1
Returns a list of available web services of version v1:
<host>:<port>/IMCMCSREST/rest/v1/describe
For example, you will find the URL of the root resource of web service “Simulations” as:
<host>:<port>/IMCMCSREST/rest/v1/IMCMCSREST/rest/v1/Simulations
You will find the URL of the child resources, grandchild resources, and so forth such as:
<host>:<port>/IMCMCSREST/rest/v1/Simulations/{id}/child/BomOperationalRoutingsView/{id}/child/BomOperationSequencesView/{id}/child/BomOperationResourcesView
Describe also returns available actions and their request/response type. For example, the following JSON node associated with the resource URL following shows that this resource accepts http PATCH requests with the mentioned content-type:
http://slce201cn14:7002/IMCMCSREST/rest/v1/GPAPlanInterface/{id}
The acceptable http request content-type is:
application/vnd.oracle.adf.resourceitem+json, instead of application/json
You can add query criteria and/or other conditions to the URL. For example, to query simulation_code Atest3 of the root resource of web service “Simulations”, use:
<host>:<port>/IMCMCSREST/rest/v1/IMCMCSREST/rest/v1/Simulations/Atest3
The simulation_code is the primary key of this resource. To filter by a non-primary-key attribute, e.g., RollupId, use:
<host>:<port>/IMCMCSREST/rest/v1/IMCMCSREST/rest/v1/Simulations/Atest3?q=RollupId=1002
This filtering feature does not support multi-attribute queries.
By default, the response of the web service returns 5 rows. To specify the number of rows to return, use:
<host>:<port>/IMCMCSREST/rest/v1/IMCMCSREST/rest/v1/Simulations/Atest3?limit=<number_of_rows>
You can also combine the two, for example., RollupId, and number of rows, as follows:
<host>:<port>/IMCMCSREST/rest/v1/IMCMCSREST/rest/v1/Simulations/Atest3?=RollupId=1002&limit=<number_of_rows>
If both the data from parent resource and child resources are needed, use the following to include a particular child resource:
<host>:<port>/IMCMCSREST/rest/v1/IMCMCSREST/rest/v1/Simulations/Atest3?expand=<child_resource_name>
To include all child resources use:
<host>:<port>/IMCMCSREST/rest/v1/IMCMCSREST/rest/v1/Simulations/Atest3?expand=all
Note: Expand includes the child resources only. It does not include grandchild resources etc..
The POST, PUT, PATCH requests must use content-type:
application/vnd.oracle.adf.resourceitem+json
The request body should be in the following format:
For example:
IMCMCS REST Web Service also supports batch requests. To submit a batch request, use the following:
URL
<host>:<port>/IMCMCSREST/rest/
HTTP Method
POST
Content-Type
application/vnd.oracle.adf.batch+json
Payload
For example: