Creating REST Endpoint API in 25.1
The REST service endpoint URL to pull the problem report and attachments of the problem Report from the Connect Service and Service Tip records is as follows:
HTTP Method: Get
URL: /services/apexrest/SVMXC/windchill/problemreport/v1/getAllProblemReports
Response:
{ "success":true, "message":"Service Plan", "data":[ { "status":"Draft", "serviceType":"Issue", "salesforceId":"a388F000000AHP7QAO", "requesterId":"User User", "name":"Test problem report", "description":"<p>This is test problem report created for testing</p>", "category":"Quality_Improvement", "attachments":[ { "versionNumber":"1", "versionDataUrl":"https://connect-connect-7468-dev-ed.scratch.file.force.com/sfc/servlet.shepherd/version/download/0688F000001w8Nv", "title":"Screen Recording 2024-01-24 at 8.19.41 AM.mov", "fileType":"MOV", "fileExtension":"mov", "description":"Screen Recording 2024-01-24 at 8.19.41 AM.mov" } ] }, //Problem report with out attachment { "status":"Draft", "serviceType":"Issue", "salesforceId":"a388F000000AHPCQA4", "requesterId":"User User", "name":"test data", "description":"<p>test 123</p>", "category":"Quality Improvement" } ]}
Sample Response of Service Tip with Attachments
{
"success":true,
"message":"Service Plan",
"data":[
{
"status":"Draft",
"serviceType":"Issue",
"salesforceId":"a388F000000AHP7QAO",
"requesterId":"User User",
"name":"Test problem report",
"description":"<p>This is test problem report created for testing</p>",
"category":"Quality_Improvement",
"attachments":[
{
"versionNumber":"1",
"title":"Screen Recording 2024-01-24 at 8.19.41 AM.mov",
"fileType":"MOV",
"fileExtension":"mov",
"description":"Screen Recording 2024-01-24 at 8.19.41 AM.mov"
}
]
}
]
}
Sample Response of Service Tip without Attachments
{
"success":true,
"message":"Service Plan",
"data":[
{
"status":"Draft",
"serviceType":"Issue",
"salesforceId":"a388F000000AHP7QAO",
"requesterId":"User User",
"name":"Test problem report",
"description":"<p>This is test problem report created for testing</p>",
"category":"Quality_Improvement"
}
]
}
Was this helpful?