OSLC Query on DNG returns "Slug should be decorated" error
I am trying to query requirements in DNG via the oslc query. I am using "dc:terms=<http://purl.org/dc/terms>" as the prefix and to filter my data I am using oslc.where="dcterms:references=<MyAppLink>". Essentially I want to filter on requirements, which contain links to my application. If I leave out the oslc.where filter I am getting all results. The links of my app look like this "https://server.com/id". If I add my filter I am getting error 400 "Slug should be decorated but is not 'id' ".
Why am I getting this error?
|
One answer
Ian Barnard (2.1k●6●13)
| answered Jul 28 '23, 12:08 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jul 28 '23, 12:11 p.m.
As DN isn't ever the source of OSLC links you won't get anything helpful by trying to query it for what are incoming link, because they're not stored in DN.
You'll have to query your application for its outgoing OSLC links to DN. Or maybe they're hyperlinks - whatever, you'll have to query in your app.
As to why you're getting the undecorated slug error - I don't know. I've never tried querying for dcterms:references.
Comments
Thomas C.
commented Jul 28 '23, 12:11 p.m.
If I query without a filter, all results, which have a link, do include the "dcterms:references rdf:resource="myapplink" parameter. The links where made from DNG to my app, therefore they are stored in DNG.
Ian Barnard
commented Jul 28 '23, 12:12 p.m.
| edited Jul 28 '23, 12:13 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Which version+ifix are you using? What sort of link are you creating; is it an OSLC link or a simple hyperlink? Is configuraiton management enabled in your DN project?
Thomas C.
commented Jul 28 '23, 12:16 p.m.
DNG Version 7.0.2. The links I create in DNG are "Reference" links, so OSLC links. They show a preview if you hover over them. ConfigManagment is enabled.
OK you're linking rm<><rm.
I get the slug error if I don't use a real DN URI for the target URI so maybe that's the problem.
Something like this (correctly url-encoded) doesn't give the slug error
oslc.where=dcterms:references=<https://jazz.ibm.com:9443/rm/resources/TX_Srwr0FEhEe2d5dG-54qhbg>
And it returns a result if there is a References link outgoing to that URI.
Not sure if this should work for external links - you could try a support case?
Thomas C.
commented Jul 28 '23, 1:57 p.m.
You are right, it works with Jazz or my DNG web server links. My application runs on an external server and does not work. I am not sure why. I assumed the backend just does a simple string comparison, but there seem to be some rules. I will try to create an internal support case. For now I will have to parse through the file and compare for myself I guess.
Ian Barnard
commented Jul 29 '23, 6:34 a.m.
| edited Jul 29 '23, 6:34 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
> parse through the file and compare for myself
Yes - include dcterms:references in your oslc.select and then postprocess the results
Thomas C.
commented Jul 29 '23, 7:37 a.m.
Exactly how I did it. It works. But parsing through a few hundred requirements is ok. Parsing through a few thousand every time we do a site refresh is gonna be a pain. I hope IBM can resolve this somehow for our business.
showing 5 of 7
show 2 more comments
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.