Topic
  • 3 replies
  • Latest Post - ‏2013-05-31T17:24:40Z by pdubovitsky
Norricorp
Norricorp
15 Posts

Pinned topic ClearQuest OSLC 2.0 REST API

‏2013-05-31T07:48:39Z |

Hi, not sure if this should be in the CQ forum or Jazz but happy to post to Jazz if that is better.

I have had a quick scan through https://jazz.net/wiki/bin/view/Main/CqOslcV2 page on the above topic and am a bit confused. I have used REST with Jira and there I can use something like curl to send a URL of the issue with a user/password parameter and get back data of that issue. But with CQ REST I am not sure if it can only be used with in CQWeb?

So is there other documentation out there? I am thinking that I would expect to have a URL of something like

/cqweb/oslc/repo/DOC/db/SAMPL22222

where SAMPL22222 is a defect ID for instance.

Sorry this is a bit vague and meandering but, as I mentioned, bit confused by this.

Regards,

John

  • pdubovitsky
    pdubovitsky
    376 Posts

    Re: ClearQuest OSLC 2.0 REST API

    ‏2013-05-31T13:33:54Z  

    Hi,

    You can use OSLC query and provide record ID as a parameter, i.e.
    oslc.where=cq:Request_ID="SAMPL22222"

    If you know your etitydef id and record dbid, you can query it directly as
    /cqweb/oslc/repo/{DBSET}/db/{DB}/record/{entitydef_id}-{record_dbid}

    Pavel

     

  • Norricorp
    Norricorp
    15 Posts

    Re: ClearQuest OSLC 2.0 REST API

    ‏2013-05-31T16:24:16Z  

    Hi,

    You can use OSLC query and provide record ID as a parameter, i.e.
    oslc.where=cq:Request_ID="SAMPL22222"

    If you know your etitydef id and record dbid, you can query it directly as
    /cqweb/oslc/repo/{DBSET}/db/{DB}/record/{entitydef_id}-{record_dbid}

    Pavel

     

    Hi Pavel, thanks for this - it is very useful.

    Just to check then, if I know the defect id (SAMPL00012345) then I have to know the dbid as well?

    eg ....../record/SAMPL00012345-123456789  (If I do try this in curl I get Error 404: SRVE0190E: File not found: /oslc/repo/....  which suggests it reached CQ REST) (I do use real values)

    Which I probably would not know the dbid so would need the query?

    eg /cqweb/oslc/repo/{DBSET}/db/{DB}/oslc.where=cq:Request_ID="SAMPL12345"    ??

    John

  • pdubovitsky
    pdubovitsky
    376 Posts

    Re: ClearQuest OSLC 2.0 REST API

    ‏2013-05-31T17:24:40Z  
    • Norricorp
    • ‏2013-05-31T16:24:16Z

    Hi Pavel, thanks for this - it is very useful.

    Just to check then, if I know the defect id (SAMPL00012345) then I have to know the dbid as well?

    eg ....../record/SAMPL00012345-123456789  (If I do try this in curl I get Error 404: SRVE0190E: File not found: /oslc/repo/....  which suggests it reached CQ REST) (I do use real values)

    Which I probably would not know the dbid so would need the query?

    eg /cqweb/oslc/repo/{DBSET}/db/{DB}/oslc.where=cq:Request_ID="SAMPL12345"    ??

    John

    Hi,

    Yes, usually, you do not know record dbid in advance, and you have to run query first.

    Pavel