• /
  • EnglishEspañolFrançais日本語한국어Português
  • EntrarComeçar agora

NerdGraph tutorial: Manage data access policies

You can use our NerdGraph API to create, query, update, and delete data access policies. Data access policies control which log partitions your users can access, allowing you to restrict access to sensitive log data based on user groups.

Requirements

To manage data access policies via NerdGraph, you need:

Before you begin

Before using the NerdGraph API for data access policies, understand how data access control works, and familiarize yourself with NerdGraph.

Common attributes

The following attributes are commonly used in data access policy queries and mutations:

Attribute

Description

organizationId

The ID of the organization associated with the policy. Used to filter policies or scope policy creation.

id

The unique identifier of the policy. Required when updating or deleting a specific policy.

name

A user-friendly name for the data access policy.

policy

The JSON object that defines the policy's rules. It includes:

  • rules: An array of rule objects.
  • operations: The operations to allow or deny (e.g., SELECT, *).
  • eventTypes: An object specifying which event types to allow (e.g., ["*"]) or except (e.g., ["Log_accessible"]).

accountId

The account ID the role grants access to.

dataAccessPolicyId

The data access policy ID that defines what data in an account is allowed.

roleId

The role ID that defines the access level.

Common operations

Here are the most common operations for managing data access policies:

Data access control UI guide

Learn how to manage data access policies through the New Relic UI.

User management concepts

Understand user types, roles, and access management.

Manage users with NerdGraph

Use the NerdGraph API to programmatically manage users and access grants.

Log partitions

Learn how to organize your log data into partitions.

Copyright © 2025 New Relic Inc.

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