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.
- Go >= 1.25
go get github.com/1898andCo/armis-sdk-go/v2The SDK uses API key authentication. To obtain your API key from the Armis console:
- Go to Settings > API Management
- Click Create to create a new API key (if one doesn't exist)
- Click Show to access the secret key and copy it
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)
}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,
}),
)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:
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- 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!
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.