Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.05 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.05 KB

Jamf API in Go

Mostly implemented Golang library for the Jamf Pro API.

The Classic API support is written manually, UAPI support is written programmatically using the OpenAPI Generator based upon the publicly available swagger docs.

Classic API Usage

Example Code

package main

import (
	"fmt"
	"time"
    "log"

	"github.com/yohan460/go-jamf-api"
)

func main() {
	url := "https://example.jamfcloud.com"
	client, err := jamf.NewClient(
        url,
        jamf.WithOAuth("client-id", "client-secret"),
    )
	if err != nil {
		log.Fatal(err)
	}

	// Use the client to make requests to the Jamf API
}

UAPI Usage

See Usage docs

UAPI Regeneration

When there is a Jamf UAPI schema upgrade the generate-api.sh file can be run with the new swagger schema as the first parameter to re-generate it

The script contains a couple of patches to ensure it is syntactically correct go code.