Search the Community
Showing results for tags 'rest-api'.
-
Hello there, and one more: how to access the REST-API of the project management system plan.io (which is based on Redmine), I'd like to share a few lines to make life easier for others. With this you can access your plan.io data, reading and writing all kind of data. Replies are JSON style (though XML is possible, that's an option) To work with JSON I usually depend on either just own AutoIt string operations or this AutoIt library, which I find best 11.2017: ; File : Json.au3 (2015.01.08) ; Purpose : A Non-Strict JavaScript Object Notation (JSON) Parser UDF ; Author : Ward $UserName="xxxxxx" ;plan.io credentials (usually e-mail address) $PassWord="xxxx" ;plan.io credentials $APIKey="xxxxxxxxxxxxxxx" ;This is the API Key from PlanIO, you can get it from the frontend, just google or ask plan.io help $URL="xxxx.plan.io/" $Command="issues.json?limit=50" ;A list of commands and options is available through plan.io REST-API help $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "https://" & $URL & $Command &" X-Redmine-API-Key: " & $APIKey, False) $oHTTP.SetCredentials($UserName, $PassWord, 0) $oHTTP.Send() $response = $oHTTP.ResponseText ConsoleWrite ($response & @CRLF & @CRLF)
-
Hello there, since I spent some time to access the REST-API of the web shop system Shopware, I'd like to share a few lines to make life easier for others. With this you can access your Shopware database, reading and writing all kind of data. Replies are JSON style. To work with JSON I usually depend on either just own AutoIt string operations or this AutoIt library: ; File : Json.au3 (2015.01.08) ; Purpose : A Non-Strict JavaScript Object Notation (JSON) Parser UDF ; Author : Ward $UserName="xxxx" ;Shopware credentials of Shopware user who has the API checkbox ticked $PassWord="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ;API-Key of this user, NOT the Password $URL="www.XXX.com/api/" $Command="orders/64682?useNumberAsId=true" ;A list of commands and options is available through shopware REST-API help; Here we read order number 64682 $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "https://" & $URL & $Command , False) $oHTTP.SetCredentials($UserName, $PassWord, 0) $oHTTP.Send() $response = $oHTTP.ResponseText ConsoleWrite ($response & @CRLF & @CRLF)