---
title: NerdGraph tutorial: APM agent configuration examples
source: https://docs.newrelic.com/docs/apis/nerdgraph/examples/apm-config-nerdgraph
---

This doc is a place for examples of configuring APM agents using our NerdGraph API.

## Configure server-side configuration [#server-side-config]

Note that for APM agents to use configuration values changed via NerdGraph, [server side configuration](https://docs.newrelic.com/docs/apm/agents/manage-apm-agents/configuration/server-side-agent-configuration#requirements) must be enabled.

For requirements, see [server-side config requirements](https://docs.newrelic.com/docs/apm/agents/manage-apm-agents/configuration/server-side-agent-configuration#requirements).

Here's an example query returning the status of the server side configuration setting for a given entity.

```graphql
query ExampleReadQuery {
  actor {
    entity(guid:"ZjY1ODgxfEFQTXxBUFBYSUNBVElPTnz0ODEwMTY3NzZ") {
      ...on ApmApplicationEntity {
        apmSettings {
          apmConfig {
            useServerSideConfig
          }
        }
      }
    }
  }
}
```

Here's an example of disabling [server-side configuration](https://docs.newrelic.com/docs/apm/agents/manage-apm-agents/configuration/server-side-agent-configuration). Note that `guid` uses an array, which may be helpful if you want to update multiple entities.

```graphql
mutation ExampleUpdateQuery {
  agentApplicationSettingsUpdate(
    guid: "ZjY1ODgxfEFQTXxBUFBYSUNBVElPTnz0ODEwMTY3NzZ"
    settings: { apmConfig: { useServerSideConfig: false } }
  ) {
    apmSettings {
      apmConfig {
        useServerSideConfig
      }
    }
    errors {
      description
      errorClass
      field
    }
  }
}
```

For how to find an entity's GUID, see [Find entity data](https://docs.newrelic.com/docs/new-relic-one/use-new-relic-one/core-concepts/what-entity-new-relic/#find).

## Retrieve settings [#get-settings]

Here's an example of returning an entity's transaction tracer settings:

```graphql
query ExampleReadQuery {
  actor {
    entity(guid:"ZjY1ODgxfEFQTXxBUFBYSUNBVElPTnz0ODEwMTY3NzZ") {
      ... on ApmApplicationEntity {
        guid
        name
        apmSettings {
          transactionTracer {
            enabled
            explainEnabled
            explainThresholdType
            explainThresholdValue
          }
        }
      }
    }
  }
}
```
