Documentation ¶
Overview ¶
Package nerdgraph provides a programmatic API for interacting with the New Relic NerdGraph GraphQL API. It can be used to run freeform queries and mutations. The GraphiQL API explorer is a useful resource for learning about what is available via the NerdGraph API:
https://api.newrelic.com/graphiql?#
Authentication ¶
You will need a valid Personal API key to communicate with the backend New Relic API that provides this functionality. See the API key documentation below for more information on how to locate this key:
https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys
Package nerdgraph provides a programmatic API for interacting with NerdGraph, New Relic One's GraphQL API.
Example (Query) ¶
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountReference ¶ added in v0.17.0
type AccountReference struct { ID int `json:"id,omitempty" yaml:"id,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` }
AccountReference represents the NerdGraph schema for a New Relic account.
type NerdGraph ¶
type NerdGraph struct {
// contains filtered or unexported fields
}
NerdGraph is used to communicate with the New Relic's GraphQL API, NerdGraph.
func New ¶
New returns a new GraphQL client for interacting with New Relic's GraphQL API, NerdGraph.
type QueryResponse ¶ added in v0.13.0
type QueryResponse struct { Actor interface{} `json:"actor,omitempty" yaml:"actor,omitempty"` Docs interface{} `json:"docs,omitempty" yaml:"docs,omitempty"` RequestContext interface{} `json:"requestContext,omitempty" yaml:"requestContext,omitempty"` }
QueryResponse represents the top-level GraphQL response object returned from a NerdGraph query request.