alexsuslov / GoOTRS

GoOTRS is a Golang wrapper for accessing OTRS (Version 5 or 6) using the REST API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GoOTRS

Documentation

https://otrscommunityedition.com/doc/api/otrs/6.0/Perl/index.html

Help

./gotrs -help
Usage of ./gotrs:
  -AllArticles
        get AllArticles from tiket
  -Attachments
        get Attachments from tiket
  -DynamicFields
        get  DynamicFields from tiket
  -config string
        gotrs config env (default ".env")
  -debugger
        enable debugger
  -get string
        get tiket from OTRS
  -update string
        update tiket in OTRS

Get by id

gotrs -get 744485  -AllArticles=true -Attachments=true -DynamicFields=true | jq .

{
  "Ticket": [
    {
      "Age": 4485388,
      "PriorityID": "3",
      "ServiceID": "",
      "Type": "Default",
      "Responsible": "root@localhost",
...

Update by id

cat test.json                                            
{
  "TicketID": 744485,
  "DynamicField": [{
    "Name": "VIP",
    "Value": "+"
  }]
}

cat test.json | gotrs -update=744485   

Error Message

{
  "Error":{
    "ErrorCode":"TicketUpdate.InvalidParameter",
    "ErrorMessage":"TicketUpdate: DynamicField->Name parameter is invalid!"
  }
}

About

GoOTRS is a Golang wrapper for accessing OTRS (Version 5 or 6) using the REST API.

License:MIT License


Languages

Language:Go 99.1%Language:Shell 0.5%Language:Makefile 0.4%