MI
michaeldcanady/gosnow
Golang wrapper for the Servicenow REST API
gosnow
DEPRECATION NOTICE: This module has been deprecated in favor of servicenow-sdk-go
Table of Contents
Current Ideas:
- Remove need for "resource"
- Build out Tables API
GoSnow is a Golang wrapper for the Service Now API.
Installation
go get github.com/michaeldcanady/gosnowUsage
import "github.com/michaeldcanady/gosnow/v6/gosnow"Examples
Getting a table value
package main
import(
"fmt"
"github.com/michaeldcanady/gosnow/v6/gosnow"
)
client, _ := gosnow.New(username, password, instance)
CSTable, _ := client.Table("TableName")
query := map[string]interface{}{"field": "value"}
respose, _ := CSTable.Get(query, 0, 0, true, nil)
fmt.Println(respose.First())Update a table value
package main
import(
"fmt"
"github.com/michaeldcanady/gosnow/v6/gosnow"
)
client, _ := gosnow.New(username, password, instance)
CSTable, _ := client.Table("TableName")
// map of values to update
query := map[string]interface{}{"field": "value"}
respose, _ := CSTable.Update(query, 1, 0, true, nil)Delete a table value
query := map[string]interface{}{"field": "value"}
respose, _ := CSTable.Delete(query)Create a table value
package main
import(
"fmt"
"github.com/michaeldcanady/gosnow/v6/gosnow"
)
client, _ := gosnow.New(username, password, instance)
CSTable, _ := client.Table("TableName")
query := map[string]interface{}{}
respose, _ := CSTable.Create(query)Contributing
See CONTRIBUTORS.md for details.
Author
Michael Canady
On this page
Languages
Go100.0%
MIT License
Created February 23, 2021
Updated October 18, 2025