I'm trying to simply "find" an RTC ticket by ID and it's telling me 404 not found. Maybe I'm supposed to be replacing _ggTXcJdTEeCznlnpJMXHdQ with something? Or jazz or oslc or contexts or the http://purl.org/dc/terms/? I have no idea what's placeholder or not and what I'm supposed to change to be specific to me from the docs.
public static void GetTicket(string credentials)
{
string localhost = "my.host.com";
string WtId = "2494443"
string item = "https://" + localhost + ":9443/jazz/oslc/contexts/_ggTXcJdTEeCznlnpJMXHdQ/workitems?" +
"oslc.where=dcterms:identifier=%22" + WtId + "%22&" +
"oslc.properties=dcterms:title,dcterms:identifier&" +
"oslc.prefix=dcterms=%3Chttp://purl.org/dc/terms/%3E";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(item);
request.Accept = "application/json";
request.Headers.Add("Authorization", "Basic " + credentials);
WebResponse response = request.GetResponse();
// ... more stuff
}
Your code comes from the "Query Capabilities" section of the documentation you mention.
And I confirm,
_ggTXcJdTEeCznlnpJMXHdQ
is part of an example, not something that is expected to work in your own environment.The discovery mechanism is key:
Only by following this discovery path will you get the actual URL to use for your work item query.