Skip to content

1898andCo/armis-sdk-go

Armis Go SDK

Armis SDK Tests Go Report Card Go Reference Go Version License

A Go client library for the Armis Centrix API. This SDK provides a simple, idiomatic, and thread-safe way to interact with the Armis platform.

Requirements

  • Go >= 1.25

Installation

go get github.com/1898andCo/armis-sdk-go/v2

Authentication

The SDK uses API key authentication. To obtain your API key from the Armis console:

  1. Go to Settings > API Management
  2. Click Create to create a new API key (if one doesn't exist)
  3. Click Show to access the secret key and copy it

Quick Start

package main

import (
    "context"
    "fmt"
    "log"
    "os"

    "github.com/1898andCo/armis-sdk-go/v2/armis"
)

func main() {
    client, err := armis.NewClient(
        os.Getenv("ARMIS_API_KEY"),
        os.Getenv("ARMIS_API_URL"), // e.g., "https://your-instance.armis.com"
    )
    if err != nil {
        log.Fatal(err)
    }

    ctx := context.Background()
    results, err := client.GetSearch(ctx, "in:devices", true, true)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("Found %d devices\n", results.Total)
}

Configuration Options

import (
    "net/http"
    "time"

    "github.com/1898andCo/armis-sdk-go/v2/armis"
)

client, err := armis.NewClient(
    apiKey,                                               // Required: API key
    "https://your-instance.armis.com",                    // Required: API URL
    armis.WithAPIVersion("v1"),                           // Optional: API version (default: v1)
    armis.WithHTTPClient(&http.Client{                    // Optional: Custom HTTP client (default: 30s timeout)
        Timeout: 60 * time.Second,
    }),
)

Contributing

Check out our Contributing Guide for information on how to contribute to the SDK.

For bug reports and feature requests, please use the issue tracker.

PRs are welcome! We follow the typical "fork-and-pull" Git workflow:

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. Submit a Pull Request so that we can review your changes

Tip

Be sure to merge the latest changes from "upstream" before making a pull request!

LLM Support

This project includes an llms.txt file following the llms.txt specification to help Large Language Models understand and work with this codebase more effectively.

About

Armis SDK for the Go programming language.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages