Initiate A Request Along With Attachment by Consuming BMC Digital Workplace Catalog REST API
Initiate A Request Along With Attachment by Consuming BMC Digital Workplace Catalog REST API
Summary Initiate a request along with attachment by consuming BMC Digital Workplace Catalog REST API
Visible to Partner
Visible In Internal
App
Visible In Public
Knowledge Base
Visible to
Customer
Internal Only No
Unpublish
Prevention Reason
Value
Visibility - Partner
Only
Has Attachment
TSA Info
This knowledge article is available to all
Helper
Component
Component
Version
Applies to
https://bmcapps.my.salesforce.com/articles/Knowledge/Initiate-a-request-along-with-attachment-by-consuming-BMC-Digital-Workplace-Catalog-REST-… 1/7
10/6/21, 11:58 PM Knowledge Article
Question How to submit a request along with attachment using Digital Workplace Advanced REST API
Answer This knowledge article may contain information that does not apply to version 21.05 or later which runs in
a container environment. Please refer to Article Number 000385088 for more information about
troubleshooting BMC products in containers.
This article will guide you through step by step procedure to submit a request along with an
attachment using the Digital Workplace Catalog REST API.
https://calbroservices-dwpcatalog.onbmc.com/api/myit-sb/
Unless an API endpoint requires a different header, the following header is required
for all requests:
default-bundle-scope: myit-sb
Content-Type: application/json
X-Requested-By: XMLHttpRequest
https://bmcapps.my.salesforce.com/articles/Knowledge/Initiate-a-request-along-with-attachment-by-consuming-BMC-Digital-Workplace-Catalog-REST-… 2/7
10/6/21, 11:58 PM Knowledge Article
2. Get service request questionnaire by using the requestId in the URL.
Request URL (GET) : https://calbroservices-dwpcatalog.onbmc.com/api/myit-
sb/request/10410/questionnaire
Response :
https://bmcapps.my.salesforce.com/articles/Knowledge/Initiate-a-request-along-with-attachment-by-consuming-BMC-Digital-Workplace-Catalog-REST-… 3/7
10/6/21, 11:58 PM Knowledge Article
Similarly, all required questions must be answered with separate API call.
4. Prepare an attachment
Request URL (POST) : https://calbroservices-dwpcatalog.onbmc.com/api/myit-
sb/content
Additional header :
Content-Disposition : form-data; name="file"; filename="Test.txt“
Body :
Under from-data, set the key to “file” and select the file by browsing the file in
“value”
Response :
{ "contentId": "AGGA49C8EC0WUAQEK1GEQDMKGSUDE3"}
This endpoint will return the contentId which will be used to make a POST call to
submit the attachment.
5. Submit an attachment
Request URL (POST) : https://calbroservices-dwpcatalog.onbmc.com/api/myit-
sb/services/10410/questionnaire/answers
Body :
{
"questionnaireId" : "10204",
"questionId" : "d4e8b5c7-1525-0356-fa61-c923499f07a9",
"answers" : ["AGGA49C8EC0WUAQEK1GEQDMKGSUDE3"],
"serviceRequestId" : "10410"
}
Note : contentId returned in previous call is used in the answer.
Response (if all okay) :
{}
2. Submit the order by calling the end point myit-sb/orders (similar to the last topic)
https://bmcapps.my.salesforce.com/articles/Knowledge/Initiate-a-request-along-with-attachment-by-consuming-BMC-Digital-Workplace-Catalog-REST-… 5/7
10/6/21, 11:58 PM Knowledge Article
2. Send all the answers and submit the order by calling the endpoint myit-sb/orders
Partner
Instructions
Marked for
Deletion
Unpublish
Prevention Reason
Internal Comment
KARecordType FAQ/Procedural
ServiceCloud Data
Load
Source
Source Id
R&D Product
DWP
Family
Submission
20/2/2020 7:04 pm
Date/Time
https://bmcapps.my.salesforce.com/articles/Knowledge/Initiate-a-request-along-with-attachment-by-consuming-BMC-Digital-Workplace-Catalog-REST-… 6/7
10/6/21, 11:58 PM Knowledge Article
Created Date 10/7/2021 3:48 pm
Boost Context
https://bmcapps.my.salesforce.com/articles/Knowledge/Initiate-a-request-along-with-attachment-by-consuming-BMC-Digital-Workplace-Catalog-REST-… 7/7