reqif_oslc definitions GET request fails
![]() I am trying GET request for reqIF oslc definitons but we are getting 400 BAD Request error. Below is the request i I am sending,
https://<machine_name>:<port>/rm/reqif_oslc/definitions/query?componentURI=https%3A%2F%2F<machine_name>%3A9443%2Frm%2Fcm%2Fcomponent%2F_doZ1wJfPEeuJi7IajZiqzw&oslc.prefix=oslc=%3Chttp://open-services.net/ns/core%23%3E&oslc.prefix=dcterms=%3Chttp://purl.org/dc/terms/%3E&oslc.prefix=nav=%3Chttp://com.ibm.rdm/navigation%23%3E&oslc.select=dcterms:title,dcterms:description,oslc:instanceShape&oslc.where=nav:parent=%3Chttps://<machine_name>:<port>/rm/process/project-areas/_di640JfPEeuJi7IajZiqzw%3E
We are getting a Bad request error as,
I would like to know what is wrong in the request or what should be the correct value. The error occurs specially when the last part of the request i.e., 'oslc.where' is added. removing the 'oslc.where' fetches the rdf file for me. I am using 7.0.2 server and 6.0.6.1 client(tried with 6.0.6.1 server and 6.0.6.1 client also) from my eclipse application. Is the request url format is wrong?
Also, is there any API documentation for reqif_oslc(+defintions)? Please direct.
I am using JKE banking project.
|
Accepted answer
![]()
Ian Barnard (1.7k●6●13)
| answered Jun 08 '21, 12:40 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 09 '21, 3:04 a.m. You're trying to do a query of reqif definitions, or if you're not then you haven't picked the correct QueryCapability.
Assuming you are, as well as properly URL encoding the URL you put to the server, you should note what the reqif API wiki page says about the query capability for reqif definitions; basically it isn't a full OSLC Query and can only handle limited parameters, specifically not oslc:select, oslc:searchTerms or oslc:orderBy, and only dcterms:title and dcterms:modified can be in the oslc.where term.
You'll need to provide a header oslc_config.context or Configuration-Context - not sure this is needed for query but it is certainly needed for export/import.
5.5 Behaviour of GET (query)A GET to the
dng_reqif:ReqIFQueryCapability
will retrieve all existing
dng_reqif:ReqIFDefinition
resources in the component.
The
The response to a GET to the
The returned data is an OSLC response format which include zero, one or many
An OSLC user can modify the behavior of the default query capability by using the oslc_where parameter Filter on following fields are supported
Following OSLC parameters are not supported by the ReqIF Query capability
I found this technote which might be useful, although it's about Export it references the headers needed https://www.ibm.com/support/pages/exporting-reqif-file-containing-requirements-using-rest-api
Manoj Kumar selected this answer as the correct answer
|
One other answer
![]()
David Honey (1.7k●1●7)
| answered Jun 08 '21, 4:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jun 08 '21, 4:28 a.m. In your example, the request parameter values are not being fully URL encoded.
For example, it looks like you're trying to specify an OSLC query expression nav:parent=<https://<machine_name>:<port>/rm/process/project-areas/_di640JfPEeuJi7IajZiqzw> .
This should be encoded as nav%3Aparent%3D%3Chttps%3A%2F%2F%3Cmachine_name%3E%3A%3Cport%3E%2Frm%2Fprocess%2Fproject-areas%2F_di640JfPEeuJi7IajZiqzw%3E.
|
Comments