How to create LABRESOURCE using REST API with example ?
Hello everyone,
I am trying to create Labresource using REST API through postman.
But i am getting HTTP 500 (Internal Server Error) or HTTP 400 (Bad request) in response.
I have basic queries below
1. What is external provider id or resource in case of lab resource creation ?
2. Looking for sample post URL with payload (Sample XML) for creating lab resource.
But i am getting HTTP 500 (Internal Server Error) or HTTP 400 (Bad request) in response.
I have basic queries below
1. What is external provider id or resource in case of lab resource creation ?
2. Looking for sample post URL with payload (Sample XML) for creating lab resource.
3. what is the link between external provider and lab resource ? Does external provider id requires in post URL for lab resource creation ?
4. what is the internal id and what if where the internal id of the resource.is not available ?
5.Post request rest API example (Sample XML) with internal resource id for lab resource ?
One answer
Hello Ian Barnard
I got the solution. Below are the details to create labresource through API (I have used postman for testing)
-------------------------------------------------------------------
LABRESOURCE POST URL (new lab resource creation) ->
LABRESOURCE POST URL (new lab resource creation) ->
https://server_FQDN:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE_Banking_CM_Junit_Testing/labresource/XLS/XLS/TestVMLabCreationAPI
In above URL TestVMLabCreationAPI is labresource name or title (Both name and title are same)
In above URL XLS/XLS why it is required to create i don't know. Not mentioned in document. I found it on forum in another question,
In above URL TestVMLabCreationAPI is labresource name or title (Both name and title are same)
In above URL XLS/XLS why it is required to create i don't know. Not mentioned in document. I found it on forum in another question,
-------------------------------------------------------------------
Below are POST request Headers
Configuration-Context : https://nxinctpd14052.eqvm.local:9443/qm/oslc_config/resources/com.ibm.team.vvc.Configuration/_IcNJMBaCEe6sC7X37XlFaQ
Content-Type : application/xml
Accept : /
-------------------------------------------------------------------
-------------------------------------------------------------------
Below is the XML passed in POST request body
<labresource xmlns="http://jazz.net/xmlns/alm/qm/v0.1/">
<title>TestVMLabCreationAPI</title>
<description>created for testing purpose through postman</description>
<type>VirtualImage</type>
<name>TestVMLabCreationAPI</name>
<memory>1024</memory>
<osType>RedHat 7.2</osType>
<osKernelWidth>64 bit</osKernelWidth>
<diskspace>3000</diskspace>
</labresource>
----------------------------------------------------------------------
Response received is 201 Created
Checked in application Labresource was created successfully and was able to see in UI.
----------------------------------------------------------------------
i don't know why XLS/XLS is required in labresource creation POST URL https://server_FQDN:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE_Banking_CM_Junit_Testing/labresource/XLS/XLS/TestVMLabCreationAPI
And strangely it has not been documented anywhere. The same has been asked in other questions as well.
Response received is 201 Created
Checked in application Labresource was created successfully and was able to see in UI.
----------------------------------------------------------------------
i don't know why XLS/XLS is required in labresource creation POST URL https://server_FQDN:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE_Banking_CM_Junit_Testing/labresource/XLS/XLS/TestVMLabCreationAPI
And strangely it has not been documented anywhere. The same has been asked in other questions as well.
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 24 '25, 8:51 a.m.What's an example of a URL you've tried, presumably a POST?
kulbhushan patil
Nov 25 '25, 4:39 a.m.kulbhushan patil
Nov 25 '25, 4:58 a.m.Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 26 '25, 12:38 p.m.What headers did you send? Did you use a configuration in either query parameter oslc_config.context or header Configuration-Context?
kulbhushan patil
Dec 18 '25, 2:46 a.m.kulbhushan patil
Dec 18 '25, 3:09 a.m.kulbhushan patil
Dec 18 '25, 3:09 a.m.Above last comment is post request body
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Dec 18 '25, 10:01 a.m.Stephe Odell
Mar 15, 8:01 p.m.The internal ID typically refers to the unique identifier generated by the platform database after a resource is created, so if it is not available yet, the request normally uses the external identifier instead.
1 vote