New Relic Blob Storage API for agent configurations
New Relic Blob Storage API for agent configurations
The Blob Storage API is a New Relic REST service for uploading and managing files in a New Relic account. Within Fleet Control, it manages agent configurations: creation, versioning, content retrieval, and deletion. NerdGraph is optimized for structured data queries and mutations; the Blob Storage API handles operations that involve file content transfer and versioning.
Fleet Control for Kubernetes clusters is generally available (GA). Support for managing agents on Linux and Windows hosts is currently in public preview.
What are the Blob Storage API endpoints?
- US:
https://blob-api.service.newrelic.com/v1/e - EU:
https://blob-api.service.eu.newrelic.com/v1/e - JP:
https://blob-api.service.jp.newrelic.com/v1/e
All requests require a User API key in the Api-Key header. License keys and Browser keys are not accepted.
What are the requirements?
- A New Relic account with a User API key
- The New Relic Organization ID
- Appropriate permissions to manage configurations
How do I use the Blob Storage API to store an agent configuration?
Send a POST request to create a new configuration:
POST /v1/e/organizations/{orgId}/AgentConfigurations
Required headers:
Api-Key: NRAK-YOUR-USER-API-KEYContent-Type: application/x-yamlNewRelic-Entity: {"name": "...", "agentType": "...", "managedEntityType": "..."}
The NewRelic-Entity header is a JSON object with three required fields:
| Field | Description |
|---|---|
name | The configuration name |
agentType | Agent type, for example NRInfra, NRDOT, FluentBit |
managedEntityType | Entity type: HOST or KUBERNETESCLUSTER |
Supported agent types: NRInfra, NRDOT, FluentBit, NRPrometheusAgent, PipelineControlGateway, NRApmOperator, NReBPFAgent.
Example curl request:
curl -X POST \
https://blob-api.service.newrelic.com/v1/e/organizations/YOUR_ORG_ID/AgentConfigurations \
-H 'Api-Key: NRAK-YOUR-API-KEY' \
-H 'Content-Type: application/x-yaml' \
-H 'NewRelic-Entity: {"name": "Production Infra Config", "agentType": "NRInfra", "managedEntityType": "HOST"}' \
-d 'license_key: YOUR_LICENSE_KEY
log:
level: info
forward: true
integrations:
- name: nri-docker
enabled: true'
The response returns an entityGuid, a blobId, and a blobVersionEntity with version number 1. Save the entityGuid: it is required for all subsequent versioning, retrieval, and deletion operations.
How do I list config versions?
GET /v1/e/organizations/{orgId}/AgentConfigurations/{configurationId}/versions
Returns all versions with entity GUID, blob ID, version number, and timestamp, plus a cursor for pagination.
How do I retrieve and then delete a specific version of a stored configuration?
Retrieve a specific version:
GET /v1/e/organizations/{orgId}/AgentConfigurationVersions/{configurationVersionId}
Retrieve the latest version:
GET /v1/e/organizations/{orgId}/AgentConfigurations/{configurationId}
Add ?version=1 to retrieve a specific version number. The response returns the configuration content as plain text YAML.
Delete a specific version:
DELETE /v1/e/organizations/{orgId}/AgentConfigurationVersions/{configVersionGuid}
Returns HTTP 204 No Content on success.
Delete a configuration and all its versions:
DELETE /v1/e/organizations/{orgId}/AgentConfigurations/{configurationId}
Returns HTTP 204 No Content on success.
How do I create a new version of an existing configuration?
POST /v1/e/organizations/{orgId}/AgentConfigurations/{parentConfigurationId}
Send updated YAML content in the request body. The response increments the version number.
What are the common error responses?
| Status code | Description | Solution |
|---|---|---|
| 400 Bad Request | Invalid parameters or malformed JSON in the NewRelic-Entity header | Verify request format and header values |
| 401 Unauthorized | Missing or invalid API key | Check that the User API key is valid and in the Api-Key header |
| 404 Not Found | Configuration or version not found | Verify the entity GUID is correct |
| 415 Unsupported Media Type | Incorrect Content-Type header | Use Content-Type: application/x-yaml |