Lab 1: Using the Tags API
Objective
Use the Tags API to add a tag to a New Relic Browser application.
Instructions
- Visit the New Relic GraphQL API Explorer: https://api.newrelic.com/graphiql.
- Select the training account’s API key from the dropdown list near the top of the window.
- In the left-hand pane, write an entitySearch query to find the
guid
of the Browser application named “New Relic Pet Clinic”. Hint (select text to reveal): You are looking for an entity whose name is ‘New Relic Pet Clinic’ in the domain of ‘BROWSER’. - Click the Execute query button near the top of the window to execute your query. See the result in the right-hand pane.
- If you get an error or do not see a
guid
in the result, return to Step 3 and try again. Otherwise, proceed to Step 6. - Write a taggingAddTagsToEntity mutation, passing the
guid
returned above, and adding atag
with a key of “training” and a value of your name. Hint: Tag values are an array, so you must surround them with square brackets. - Execute your mutation, ensuring that no errors are returned in the result.
- Optional: Write and execute an entity query to view the tags associated with the New Relic Pet Clinic Browser application.