Update the Description in a Quality Issue or Action
You can use REST API to manage the quality issues and actions to identify problems take preventive or corrective actions.
When you create a quality issue or action, you can't add the description. Description is a character large object (CLOB) attribute and has to be updated as an enclosure.
Here's a typical application processing flow for the scenarios:
- Create a new quality issue
- Update the description for the quality issue
Create a New Quality Issue
In this scenario, you create a new quality issue.
Example URL
Use this resource URL format.
POST
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/qualityIssues"
Example Request
Here's an example of the request body in JSON format.
{
"Name" : "Issues with part AS54777",
"QualityTypeCode" : "ORA_ENQ_QI_PR_ITEM",
"Severity" : "ORA_HIGH",
"Downtime" : 20,
"Source" : "ORA_QUALITY",
"OrganizationCode" : "V1",
"WorkflowTemplateId" : 2000
}
Example Response
Here's an example of the response body in JSON format.
{
"IssueId" : 300100115930062,
"IssueNumber" : "ISSUE151",
"Name" : "Issues with part AS54777",
"QualityTypeId" : 1404,
"QualityTypeCode" : "ORA_ENQ_QI_PR_ITEM",
"Severity" : "ORA_HIGH",
"Downtime" : 20,
"Source" : "ORA_QUALITY",
"OrganizationId" : 204,
"OrganizationCode" : "V1",
...
}
Update Description For Quality Issue
In this scenario, assume you want to update the description for the new quality issue. Since description is a character large object (CLOB), it is managed using enclosure through REST.
Example URL
Here's an example of the request body in JSON format you use to send a REST request using enclosure. This command updates the description for the quality issue.
PUT
curl -k -X PUT -H "Content-Type: application/octet-stream" -u username:password -d 'Part AS54777 is not working.' "https://servername/fscmRestApi/resources/version /qualityIssues/300100115930062/enclosure/Description"
Example URL
Here's an example of the request body in JSON format to submit a request to get the description of the quality issue 300100115930062.
GET
curl -k -H "Content-Type: text/plain" -u uusername:password "https://servername/fscmRestApi/resources/version/qualityIssues /300100115930062/enclosure/Description"
Example Response
Here's an example of the response body in JSON format.
Part AS54777 is not working.