DX Unified Infrastructure Management

 View Only
  • 1.  Query the UIM REST API with Golang

    Posted Aug 08, 2018 01:19 AM

    I've been playing around with Go a little bit and wrote a simple script that can query the UIM REST API and retrieve some information.  Just thought I would put it out there if anyone else is interested.

     

    GitHub - BryanKMorrow/gouim: Go library to interact with CA UIM REST API 

     

    Go script that can interact with the UIM REST API.

    1. git clone https://github.com/BryanKMorrow/gouim.git
    2. cd gouim
    3. go build
    4. go run main.go

    You should only need to modify the following lines:



  • 2.  Re: Query the UIM REST API with Golang

    Posted Aug 08, 2018 07:49 AM

    Hi Brian,

     

    I am getting below error while build, am i doing something wrong

     

     

    Regards

    Hitesh



  • 3.  Re: Query the UIM REST API with Golang

    Posted Aug 08, 2018 07:56 AM

    Try doing a go get and a go install instead of go build. 



  • 4.  Re: Query the UIM REST API with Golang

    Posted Aug 08, 2018 08:20 AM

    Now it's giving below error:



  • 5.  Re: Query the UIM REST API with Golang

    Posted Aug 08, 2018 09:21 AM

    It looks like git may not be in your PATH environment variable.

     

    golang "go get" command showing "go: missing Git command" error - Stack Overflow 

     

    "The go get fetching of source code is done by using one of the following tools expected to be found on your system either git, svn, hg.

    Install git from this link https://git-scm.com/downloads

    After installing git you should navigate to the environment variables setting and add the path of git.exe(executable file) which is found in the bin. So the path should look like this "C:\Program Files\Git\bin". Restart your IDE and the command should be working."



  • 6.  Re: Query the UIM REST API with Golang

    Posted Aug 08, 2018 10:09 AM

    Thanks Bryan, i will give it a try.