Public preview
The Blob Storage API for notebooks is currently in public preview. This feature is provided pursuant to our pre-release policies.
The New Relic Notebooks API lets you create, read, update, and delete notebooks programmatically, including their full block content (NRQL queries, text). Notebooks are stored as versioned blobs, which means every save produces a new immutable revision you can retrieve later.
Use this API to:
- Automate notebook creation from incident templates, runbooks, or CI/CD pipelines
- Sync notebook content from version control or external authoring tools
- Build integrations that programmatically populate notebooks during investigations
Importante
Notebooks use multiple APIs
The Notebooks API surface is split between two systems:
Blob Storage API handles notebook content (blocks, version history)
NerdGraph handles entity-level operations (list, rename, tags, organization metadata)
This separation is by design. The Blob Storage API is optimized for file content transfer and versioning; NerdGraph is optimized for structured entity queries and mutations.
Prerequisites
- A New Relic account with a User API key
- Your New Relic Organization ID
- Appropriate permissions to manage notebooks
Authentication
All Notebooks API requests require authentication using a New Relic User API key.
Generate an API key:
- Navigate to one.newrelic.com
- Click on your name in the top-right corner
- Select API Keys
- Create a User key (not Browser or License key)
Include in request headers:
$Api-Key: NRAK-YOUR-USER-API-KEYDica
The Blob Storage API also supports login context, so when calling the API from a UI authenticated as a New Relic user, the Api-Key header is not required.
Base endpoint
https://blob-api.service.newrelic.com/v1/eFor EU region accounts, use:
https://blob-api.service.eu.newrelic.com/v1/eNotebook content operations
Entity operations (NerdGraph)
Entity-level operations such as listing, renaming, and tagging use NerdGraph rather than the Blob Storage API.
List all notebooks
query listAllNotebooks { actor { entityManagement { entitySearch(query: "type='NOTEBOOK'") { entities { id name } } } }}Dica
Entity creation is fully transactional, so a notebook is immediately available via the API. However, if you list notebooks through the legacy actor.entitySearch query, there may be a short propagation delay between creation and the notebook appearing in list results.
Rename a notebook
mutation changeNotebookName { entityManagementUpdateNotebook( id: "<entity guid>" notebookEntity: { name: "<new name>" } ) { entity { name } }}Update notebook tags
Importante
Tag updates are a replace operation. You must include the complete set of tags, even ones that aren't changing — any tag omitted from the mutation will be removed.
mutation updateNotebookTags { entityManagementUpdateNotebook( id: "<entity guid>" notebookEntity: { tags: [ { key: "<key>", values: "<value>" } { key: "<key>", values: "<value>" } ] } ) { entity { name tags { key values } } }}Retrieve your organization ID
You'll need your organization ID for all Blob Storage API calls:
query getOrgId { actor { organization { id } }}Best practices
- Store entity GUIDs: Save the
entityGuidreturned from create operations. You'll need it for reading, updating, and deleting notebooks. - Validate JSON before upload: Ensure your notebook payload is valid JSON and conforms to the
versionschema before sending. - Use descriptive names: Notebook names must be unique within an organization, so choose names that clearly indicate purpose (for example,
prod-checkout-investigationrather thannotebook-1). - Include all tags on update: Tag updates replace the full tag set. Always read existing tags before mutating.
- Recover quickly: Version history is retained for only 1 day. If you need long-term history, archive notebook content to your own storage on every update.
- Secure your API key: Never expose your User API key in client-side code or public repositories.
- Check HTTP status codes: The API returns 2xx for successful operations, 404 for not found, and other status codes for errors.
Common error responses
Status code | Description | Solution |
|---|---|---|
| Invalid request parameters, malformed JSON in body or | Verify request format, header values, and that the notebook name is unique within your organization |
| Missing or invalid API key | Check that your User API key is valid and included in the |
| Notebook or version not found | Verify the entity GUID is correct |
| Incorrect | Use |
Additional resources
- Notebooks overview — How to use Notebooks in the New Relic UI
- Introduction to NerdGraph — GraphQL API reference
- Blob Storage API for agent configurations — Sister API used by Fleet Control
- New Relic API keys — Key types and management