It's all about the answers!

Ask a question

DNG: Get all links query does not return all the links


Oded Mozesh (52618) | asked Dec 07 '17, 3:28 p.m.
Hi,

I have a script use OSLC query that get all the links in DNG DB  (https://my.company.com-9443__allLinks.xml).

The script copy all the links.

It works fine on new DNG 5.0.2.

Now we have updated other DNG from version 5.0.1 to 5.0.2 (some or even all projects originated from DNG 4.X).

The problem is that I get only small part of the links (and only of type Decomposition).

1. It seams the data was not updated and I get the same query result as in the older version. Is there a way to fix it?
2. How can I do get all links.
3. Is there other way to get all the artifacts, their links and the link targets/sources?


Thanks,
Oded





Comments
Donald Nong commented Dec 08 '17, 1:46 a.m.

You didn't even say how you tried to get the links. What is the exact OSLC query?


Oded Mozesh commented Dec 09 '17, 3:28 p.m.

 Sorry, my mistake.


I used perl script that runs CURL to get all the links using the URL "https://my.company.com:9443/rm/links?private=true"


sub getDataFromUriToFile
{
my $uri=$[0];
my $oFileName=$[1];
my $cmd=qq($CURL -D - -k -b $COOKIES -H "Content-Type: application\/xml" -H "Accept: application\/rdf+xml" -H "OSLC-Core-Version: 2.0" "$uri" > $oFileName);
system("$cmd");
}


Oded Mozesh commented Dec 09 '17, 3:31 p.m.

 To login I used the following Perl function (to set the $COOKIES)

sub Login{
#my $CURL="C:\Curl_7_33\curl.exe";
# RTC Authentication
my $LoginHost=$_[0];
my $COOKIES  = "cookies.$$" ;
my $CMD = qq($CURL -s -k -c $COOKIES \"$LoginHost/authenticated/identity\");
system("$CMD");

$CMD = qq($CURL -s -k -L -b $COOKIES -c $COOKIES -d j_username=$USERNAME -d j_password=$PASSWORD  \"${LoginHost}/authenticated/j_security_check\");
system("$CMD");

return $COOKIES;
}

Be the first one to answer this question!


Register or to post 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.