It's all about the answers!

Ask a question

rtc rest in EXCEL macro


giorgio salvemini (131) | asked Jun 15, 4:41 p.m.

 

<c-wiz class="rm1UF UnxENd dHeVVb" data-node-index="2;0" data-p="%.@."","",""]" jsaction="fgP5ge:reBGj,fO5Jj;SuwQzc:psubsc;ZJRbqd:R99J9b;PPMpVe:Ro8hud;iRXaId:vQ5fhd,QHu6Rd,g1rTCe,hHjFBe;WUl1Sc:Lt1lf;ETwhqd:ohO51;xlKgVc:sz93Ff;auJseb:IV7LWe;pNe98e:B1XqVb;xFfZGc:fO5Jj;OQcvYd:o9EnMb,lXvwxb;sT00Fe:Nrlepe;K1idad:ueU8Ab;MFfQNe:XTf7qb;n3ynxb:tQNmWe;k9TsOe:PCDOwc;RRMwLc:Fg8W1e;mG3QHf:OYLrVb;Qz4V0b:hQ7xdc;fBzasf:YoknPd;UgEtGb:hQ7xdc;h5CHLc:i5R1S; click:gx3W4c; touchend:Ui18c;h1Uxi:qx6Cqc;PF39hf:gx3W4c;HmXuze:peH7Nc;FvQNXc:T2uEDc,J6gWY;zOKmBc:rV2CEd,ZQTNrf;NC92Xd:t0GU7d,UbDGRc;XZiffb:MEUYed,ZcXqnb;" jscontroller="M2suMc" jsdata="deferred-c1153" jsmodel="hc6Ubd LP4cEc" jsrenderer="xuEY0" jsshadow="" style="-webkit-tap-highlight-color: transparent; background-color: rgb(255, 255, 255); color: rgba(0, 0, 0, 0.87); contain: style; display: flex; flex-direction: column; flex: 1 1 0%; font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: medium; position: relative;">
481 / 5000
<c-wiz class="reACy" data-node-index="1;0" data-p="%.@."",""]" jsaction="rcuQ6b:FkvwT;fgP5ge:vQ5fhd;pYfCx:Rayp9d;G5uTk:YW7Ut;nuAkFb:VbcIxe;PF39hf:WijZA,bakTsb,w0auy,uc7bub,OG0KKc,sMOlGe;h1Uxi:Hkadab;keAsDe:OdlKe,IBxxHd;we4cO:xCAWWb;" jscontroller="AKLKy" jsdata="deferred-i17" jsmodel="hc6Ubd VETAO" jsrenderer="rQ304" jsshadow="" style="-webkit-tap-highlight-color: transparent; contain: style;">
https://www.gstatic.com/inputtools/images/ita_sprite8.png" margin: 6px 0px 0px; opacity: 0.26; user-select: none; vertical-align: middle; width: 23px;">
</c-wiz>
</c-wiz> <c-wiz aria-labelledby="c1154" class="P6w8m BDJ8fb BLojaf" data-node-index="5;0" data-p="%.@.]" jsaction="cVBjOb:R39vXe,IUcju,SJbMmc,SsILKe,jsOQJc,e5Ystc,AZZyxc;LHU2xc:Yihg0b,Wm5pEd;qDGYgb:zX13ie;yZ6OX:QUCxlc,RHer4;eLAnNe:yz7ijf;F5MSFd:twqeXd;UgEtGb:hQ7xdc,j0ySHf;qE2zJe:WOjgW;fBzasf:YoknPd;Qz4V0b:hQ7xdc;h5CHLc:RnmhLc;AwBmXe:OzU88,ZKzul;Q1tZlf:YEdRcb,BwbFIf;lUENBf:CK2cEd;" jscontroller="pPThOe" jsdata="deferred-c1155" jsmodel="hc6Ubd" jsrenderer="WFss9b" jsshadow="" role="region" style="-webkit-tap-highlight-color: transparent; background: rgb(245, 245, 245); border-bottom-right-radius: 8px; border-left: 1px solid rgba(0, 0, 0, 0.12); color: rgba(0, 0, 0, 0.87); contain: style; display: flex; flex-direction: column; flex: 1 1 0%; font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: medium; overflow-wrap: break-word; position: relative; white-space: pre-wrap; word-break: break-word;">

Risultati della traduzione

I would like to query rtc via excel script to know what all the project areas are. I do not find a simple documentation that leads me to have an immediate result. I carry the code I wrote, but I have several problems: 1) how do i log in with my credentials? 2) why in the excel debug view I have a result in XML and not JSON? 3) where can I find the list of all the GET and POST commands that I can use? 4) is the strUrl right? here my code:

Sub Test_LateBinding()

 

    Dim objRequest As Object

    Dim strUrl As String

    Dim blnAsync As Boolean

    Dim strResponse As String

   

    Set objRequest = CreateObject("MSXML2.XMLHTTP")

    strUrl = "https://myserver/ccm/rpt/repository/ <wbr> foundation?fields=foundation/ <wbr> projectArea/"

    blnAsync = True

 

    With objRequest

        .Open "GET", strUrl, blnAsync

        .SetRequestHeader "Content-Type", "application/json"

        .Send

               While objRequest.readyState <> 4

            DoEvents

        Wend

        strResponse = .ResponseText

    End With

 

    Debug.Print strResponse

 

End Sub


</c-wiz>


Comments
Ralph Schoon commented Jun 16, 9:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The question is herd to read. Please remove the annotated text to improve the readability.

One answer



permanent link
Ralph Schoon (58.5k23642) | answered Jun 16, 12:47 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jun 16, 1:00 p.m.
Before doing testing in Excel, I would advise to test using a REST client such as Firefox RESTCLIENT or POSTMAN. See https://rsjazz.wordpress.com/2019/05/13/using-a-rest-client-to-authenticate-to-elm-clm-applications/ for authentication.

There are several ways to access the data. Reportable REST API, OSLC, Process API.

OSLC (and the other APIs) are introduced here https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding

Questions that I found in this forum with interesting content. There are many more.

Reportable REST API and Process API that work



For JSON use this accept header: Accept application/json; charset=utf-8
OSLC always needs the header: OSLC-Core-Version 2.0

Your answer


Register or to post your answer.