• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Programmatic access to Fleet Control: APIs and CLI

Feature Availability

Fleet Control for Kubernetes clusters is generally available (GA). Support for managing agents on Linux and Windows hosts is currently in public preview.

For a complete list of supported agents and their environments, see our agent type compatibility documentation.

The public preview feature is provided pursuant to our pre-release policies.

Fleet Control provides comprehensive programmatic access through APIs and a command-line interface, enabling you to automate fleet operations, integrate with existing tooling, and manage your instrumentation at scale without relying on the UI.

Programmatic access options

Fleet Control offers three methods for programmatic access:

  • NerdGraph API: For fleet management operations including creating fleets, managing members, and controlling deployments
  • Blob Storage API: For agent configuration operations including creating, versioning, and retrieving configurations
  • Fleet Control CLI: For interactive command-line management and automation scripts

Important: Fleet Control uses multiple APIs

Fleet Control's API surface is split between two systems:

  • NerdGraph handles fleet operations (fleets, members, deployments)

  • Blob Storage API handles agent configurations (configs, versions, content)

    This separation is by design. The Blob Storage API is a general New Relic service optimized for file uploads and versioning, while NerdGraph is optimized for structured data queries. Understanding which API to use for your specific task is essential for successful integration.

When to use APIs vs. CLI

Understanding which access method best fits your use case will help you work more efficiently with Fleet Control.

APIs (NerdGraph + Blob Storage API)

APIs are best for:

  • Automation and integration: Building Fleet Control operations into CI/CD pipelines, custom tooling, or other automated workflows
  • Infrastructure as Code: Managing fleet configurations alongside your infrastructure definitions
  • System-to-system integration: Connecting Fleet Control with other platforms, ticketing systems, or orchestration tools
  • Complex workflows: Creating sophisticated automation that combines multiple operations or integrates with external data sources
  • Programmatic access: When you need to build Fleet Control capabilities into your own applications or services

Fleet Control CLI

The CLI is best for:

  • Interactive operations: Quick, human-driven tasks from the command line
  • Ad-hoc management: One-off administrative operations or troubleshooting
  • Terminal-based workflows: If you prefer working directly in your terminal
  • Local testing: Experimenting with fleet operations before automating them
  • Shell scripts: Simple sequential operations (though APIs may be better for complex automation)
  • Learning and exploration: The CLI provides immediate, structured feedback that helps you understand Fleet Control operations

The CLI is built on top of the same APIs, so functionally they provide the same capabilities. The choice is about interface preference and use case: CLI for human interaction and convenience, APIs for programmatic integration and automation.

NerdGraph API (Fleet operations)

NerdGraph is New Relic's GraphQL API that provides access to Fleet Control operations for managing fleets, members, and deployments. Unlike agent configurations (which use the Blob Storage API), all fleet-level operations use NerdGraph.

What you can do with the NerdGraph API

The NerdGraph API provides mutations for:

  • Fleet management: Create, update, and delete fleets
  • Fleet member management: Add and remove managed entities from fleet rings
  • Deployment management: Create, update, delete, and trigger deployments

For comprehensive documentation including parameter descriptions, request/response examples, and detailed mutation specifications, refer to NerdGraph Fleet Control tutorial.

To explore the API interactively, use the NerdGraph Explorer (or EU region).

For general NerdGraph information, see Introduction to NerdGraph.

Blob Storage API (agent configurations)

The Blob Storage API is a New Relic service designed for uploading and managing files. Fleet Control uses the Blob Storage API to manage agent configurations, as NerdGraph is optimized for structured data queries rather than efficient file transfer. This API handles all configuration-related operations, including creating configurations, versioning, retrieving content, and deletion.

Important: Configurations use the Blob Storage API

Agent configurations do not use NerdGraph. All configuration operations—creating, versioning, retrieving, and deleting—are handled through the Blob Storage API at https://blob-api.service.newrelic.com/v1/e.

What you can do with the Blob Storage API

The Blob Storage API supports:

  • Create agent configurations: Initialize new configurations with metadata (name, agent type, managed entity type)
  • Version management: Create new versions of existing configurations
  • Retrieve configurations: Get configuration content by version or latest
  • Delete operations: Remove configurations or specific versions
  • List versions: View all versions of a configuration with timestamps

For comprehensive documentation including curl examples, request/response formats, header specifications, and supported agent types, refer to Blob Storage API reference - Complete guide with curl examples and parameter details

The API reference includes working examples for all operations, authentication requirements, and best practices for managing agent configurations programmatically.

Fleet Control CLI

The Fleet Control CLI is a comprehensive command-line interface for managing all Fleet Control entities including fleets, configurations, deployments, members, and entity queries. The CLI provides a structured, terminal-based workflow for both interactive operations and automation.

Command hierarchy

Fleet Control commands are organized by resource type for intuitive navigation:

newrelic fleetcontrol
├── fleet # Fleet management
│ ├── create # Create a new fleet
│ ├── get # Get fleet details
│ ├── search # Search fleets
│ ├── update # Update fleet
│ ├── delete # Delete fleet(s)
│ └── members # Manage fleet members
│ ├── add # Add entities to ring
│ ├── remove # Remove entities from ring
│ └── list # List fleet members
├── configuration # Configuration management
│ ├── create # Create configuration
│ ├── get # Get configuration content
│ ├── delete # Delete configuration
│ └── versions # Manage configuration versions
│ ├── list # List all versions
│ ├── add # Add new version
│ └── delete # Delete specific version
├── deployment # Deployment management
│ ├── create # Create deployment
│ ├── update # Update deployment
│ ├── deploy # Trigger deployment
│ └── delete # Delete deployment
└── entities # Entity queries
├── get-managed # List managed entities
└── get-unassigned # List available entities

Key capabilities

The Fleet Control CLI enables you to:

  • Centralize agent operations: Install, monitor, configure, and update all agents and integrations from the command line
  • Manage fleets: Group entities by instrumentation needs and upgrade agent versions for entire fleets
  • Create and version configurations: Author agent configurations and manage multiple versions
  • Control deployments: Create, update, and trigger deployments with ring-based rollouts
  • Query entities: List managed and unassigned entities to understand your fleet landscape

Prerequisites

Before using Fleet Control CLI commands, you'll need:

Required environment variables:

bash
$
# Your New Relic User API Key
$
export NEW_RELIC_API_KEY="NRAK-YOUR-API-KEY-HERE"
$
$
# Your New Relic Account ID
$
export NEW_RELIC_ACCOUNT_ID="your-account-id"
$
$
# Optional: Specify region (defaults to US)
$
export NEW_RELIC_REGION="US" # or "EU" for European accounts

Getting your credentials:

  1. API Key: Generate a User API Key from one.newrelic.com → Click your name → API Keys → Create a "User" key
  2. Account ID: Find your account ID in the New Relic URL after /accounts/ or in Account settings
  3. Organization ID: Most commands accept an optional --organization-id flag. If not provided, the CLI will automatically fetch your organization ID using your API credentials.

Complete CLI documentation

For getting started with the Fleet Control CLI including installation and setup, see the Fleet Control CLI repository.

For detailed Fleet Control command reference, response formats, validation rules, and troubleshooting guidance, see the Fleet Control CLI README.

The CLI documentation includes:

  • Complete command reference for all operations
  • Response format specifications
  • Working with JSON responses using jq
  • Practical workflow examples
  • Validation rules and allowed values
  • Troubleshooting common issues
  • Flag syntax and usage patterns

Getting started with programmatic access

To begin using Fleet Control programmatically:

  1. Generate a User API Key from your New Relic account settings
  2. Identify your Account ID and Organization ID from the New Relic platform
  3. Choose your access method:
    • Use the NerdGraph Explorer to explore fleet operations interactively
    • Review the Blob Storage API operations for configuration management
    • Install and configure the Fleet Control CLI for terminal-based workflows
  4. Start with read operations to familiarize yourself with the data structures (search fleets, list entities, get configurations)
  5. Build automation gradually by combining operations into scripts or workflows

For additional help with APIs, see our Introduction to NerdGraph documentation and API Keys documentation.

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.