Each of the following API calls handles one part of creating and assigning a custom role for Memory. Expand each one for its input parameters and sample request and response.
Use the customerAdministration query to retrieve a list of capabilities, their permission IDs, and related information. Filter by feature to get Memory permissions.
Input parameters
Parameter
Data type
Description
eq (Required)
String
Set the value to Memory (account-scoped) or Memory For Organization (organization-scoped) to retrieve the matching permissions.
Sample request — account-scoped
{
customerAdministration{
permissions(filter:{feature:{eq:"Memory"}}){
items{
feature
category
id
product
}
}
}
}
Sample response
{
"data":{
"customerAdministration":{
"permissions":{
"items":[
{
"category":"READ",
"feature":"Memory",
"id":"xxxxx",
"product":"New Relic AI"
},
{
"category":"MODIFY",
"feature":"Memory",
"id":"xxxxxx",
"product":"New Relic AI"
},
{
"category":"DELETE",
"feature":"Memory",
"id":"xxxxxx",
"product":"New Relic AI"
}
]
}
}
}
}
Run the same query with feature: { eq: "Memory For Organization" } to retrieve the organization-scoped permission IDs (READ, MODIFY, DELETE for Memory For Organization).
From the response, copy the permission IDs where feature is Memory or Memory For Organization, matching the access level you want to grant. You'll need these IDs to create the custom role.
Retrieve your organization ID, which you'll use in subsequent mutations. For an account-scoped role, also retrieve the account ID.
Sample request
{
actor{
organization{
id
}
accounts{
id
name
}
}
}
Sample response
{
"data":{
"actor":{
"organization":{
"id":"YOUR_ORGANIZATION_ID"
},
"accounts":[
{
"id":"YOUR_ACCOUNT_ID",
"name":"Your Account Name"
}
]
}
}
}
Copy the ID(s) you need from the response. You'll use them to create the custom role.
Use the customRoleCreate mutation to create your custom role for Memory management.
Input parameters
Parameter
Data type
Description
id (Required)
String
The organization ID (organization-scoped) or account ID (account-scoped) from the previous call.
type (Required)
String
Set to organization for an organization-scoped role, or account for an account-scoped role.