Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2a1ad38
Restructure Synthetic Monitoring API doc
PallaviWrite Sep 4, 2025
00e0ffe
Update nerdgraph-synthetics-tutorial.mdx
PallaviWrite Sep 30, 2025
e4c1378
Improve language clarity in NerdGraph synthetics tutorial
PallaviWrite Oct 13, 2025
1e92c12
Updated Manage your secure credentials section
PallaviWrite Oct 15, 2025
eb4e0da
updated manage monitor your downtimes section
PallaviWrite Oct 15, 2025
da3e77b
Update nerdgraph-synthetics-tutorial.mdx
PallaviWrite Nov 13, 2025
2b553ea
removed repetitive content
PallaviWrite Nov 18, 2025
ca71ded
wip
PallaviWrite Nov 18, 2025
eccd8c1
added all monitor types under synthetics api
PallaviWrite Nov 27, 2025
0a4c3a9
Added upgrade monitor run time
PallaviWrite Nov 27, 2025
ac39194
Added downgrade a scripted monitor
PallaviWrite Nov 27, 2025
a7be034
Added private locations and Downgrade a scripted API monitor's runtime
PallaviWrite Nov 27, 2025
e1ab2e9
Added secure credentials section
PallaviWrite Nov 27, 2025
0d60383
Added Monitor downtimes section
PallaviWrite Nov 27, 2025
86a6380
Added queries section
PallaviWrite Nov 28, 2025
d95e785
Updated get-started with overview
PallaviWrite Nov 28, 2025
664283d
Changed queries file to query-synthetics-data
PallaviWrite Nov 28, 2025
d65d5f4
Added left nav
PallaviWrite Nov 28, 2025
73e958b
Updated overview file
PallaviWrite Nov 28, 2025
c6bd21c
updated links for account id and guid for ping
PallaviWrite Nov 28, 2025
0aef163
Added account id and guid links
PallaviWrite Nov 28, 2025
da6f4a8
updated links for account id and guid
PallaviWrite Dec 1, 2025
fb0362e
updated links for private locations
PallaviWrite Dec 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added private locations and Downgrade a scripted API monitor's runtime
  • Loading branch information
PallaviWrite committed Nov 27, 2025
commit a7be03452b8c954435f68ef0aea8eb5327d736fa
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
---
title: "NerdGraph tutorial: Manage private locations"
tags:
- Synthetics
- APIs
- NerdGraph
- Examples
metaDescription: How to use New Relic NerdGraph API to create and manage private locations for synthetic monitoring.
freshnessValidatedDate: never
---

[Private locations](/docs/synthetics/synthetic-monitoring/private-locations/private-locations-overview-monitor-internal-sites-add-new-locations) allow you to monitor applications behind your firewall or in restricted networks. When you create a private location, you install and configure private minions to execute the monitors assigned to that private location. This tutorial provides examples of how to use the NerdGraph API to programmatically manage private locations.

## Create a private location [#create-private-location]

You can create a private location using the `syntheticsCreatePrivateLocation` mutation. This mutation allows you to set up a new private location in your monitoring infrastructure where you can deploy private minions or job managers.

### Input parameters

<table>
<thead>
<tr>
<th>Parameter</th>
<th>Data Type</th>
<th>Is it Required?</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`accountId`</td>
<td>Integer</td>
<td>Yes</td>
<td>The account ID associated with the private location.</td>
</tr>
<tr>
<td>`description`</td>
<td>String</td>
<td>No</td>
<td>The description of the private location.</td>
</tr>
<tr>
<td>`name`</td>
<td>String</td>
<td>Yes</td>
<td>The name of the private location.</td>
</tr>
<tr>
<td>`shared`</td>
<td>Boolean</td>
<td>No</td>
<td>Specifies whether the private location is shared across the organization.</td>
</tr>
<tr>
<td>`verifiedScriptExecution`</td>
<td>Boolean</td>
<td>Yes</td>
<td>If the value is true, the private location requires a password to edit.</td>
</tr>
</tbody>
</table>

### Sample request

```graphql
mutation {
syntheticsCreatePrivateLocation(
accountId: ACCOUNT_ID,
name: "PrivateLocationName",
description: "Optional description",
shared: true,
verifiedScriptExecution: false
) {
guid
errors {
description
type
}
}
}
```

### Sample response

A successful response returns the GUID of the newly created private location:

```json
{
"data": {
"syntheticsCreatePrivateLocation": {
"guid": "PRIVATE_LOCATION_GUID",
"errors": null
}
}
}
```

If there are any issues creating the private location, the `errors` array will contain objects with `description` and `type` fields explaining what went wrong.

## Update a private location [#update-private-location]

You can update an existing private location using the `syntheticsUpdatePrivateLocation` mutation. This allows you to modify the configuration of a private location that has already been created.

<Callout variant="important">
If a location is shared and used by other accounts in your organization to run synthetic monitors, you cannot unshare this private location until those monitors are disabled.
</Callout>

### Input parameters

<table>
<thead>
<tr>
<th>Parameter</th>
<th>Data Type</th>
<th>Is it Required?</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`guid`</td>
<td>String</td>
<td>Yes</td>
<td>The unique entity GUID of the private location you want to update.</td>
</tr>
<tr>
<td>`description`</td>
<td>String</td>
<td>No</td>
<td>The description of the private location.</td>
</tr>
<tr>
<td>`shared`</td>
<td>Boolean</td>
<td>No</td>
<td>Specifies whether the private location is shared across the organization.</td>
</tr>
<tr>
<td>`verifiedScriptExecution`</td>
<td>Boolean</td>
<td>Yes</td>
<td>If the value is true, the private location requires a password to edit.</td>
</tr>
</tbody>
</table>

### Sample request

```graphql
mutation {
syntheticsUpdatePrivateLocation(
guid: "ENTITY_GUID",
description: "EnterYourDescription",
shared: false,
verifiedScriptExecution: true
) {
description
verifiedScriptExecution
errors {
description
type
}
}
}
```

### Sample response

A successful response returns the updated fields and `null` for errors:

```json
{
"data": {
"syntheticsUpdatePrivateLocation": {
"description": "EnterYourDescription",
"verifiedScriptExecution": true,
"errors": null
}
}
}
```

If there are any issues updating the private location, the `errors` array will contain objects with `description` and `type` fields explaining what went wrong.

## Purge a private location job queue [#purge-private-location]

You can clear the job queue for a private location using the `syntheticsPurgePrivateLocationQueue` mutation. This is useful when you need to remove a backlog of queued synthetic monitor jobs that may have accumulated due to performance issues or temporary connectivity problems.

<Callout variant="tip">
Use this operation carefully as it will permanently remove all queued jobs. Jobs currently running will not be affected.
</Callout>

### Input parameters

<table>
<thead>
<tr>
<th>Parameter</th>
<th>Data Type</th>
<th>Is it Required?</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`guid`</td>
<td>String</td>
<td>Yes</td>
<td>The unique identifier (GUID) of the private location whose job queue you want to purge.</td>
</tr>
</tbody>
</table>

### Sample request

```graphql
mutation {
syntheticsPurgePrivateLocationQueue(
guid: "PRIVATE_LOCATION_ENTITY_GUID"
) {
errors {
description
type
}
}
}
```

### Sample response

A successful response returns `null` for errors:

```json
{
"data": {
"syntheticsPurgePrivateLocationQueue": {
"errors": null
}
}
}
```

If there are any issues purging the queue, the `errors` array will contain objects with `description` and `type` fields explaining what went wrong.

## Delete a private location [#delete-private-location]

When a private location is no longer needed, you can permanently remove it using the `syntheticsDeletePrivateLocation` mutation.

<Callout variant="important">
Before deleting a private location, ensure no monitors are assigned to it. Deleting a private location that has active monitors assigned will cause those monitors to fail.
</Callout>

### Input parameters

<table>
<thead>
<tr>
<th>Parameter</th>
<th>Data Type</th>
<th>Is it Required?</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`guid`</td>
<td>String</td>
<td>Yes</td>
<td>The unique entity GUID of the private location you want to delete.</td>
</tr>
</tbody>
</table>

### Sample request

```graphql
mutation {
syntheticsDeletePrivateLocation(
guid: "ENTITY_GUID"
) {
errors {
description
type
}
}
}
```

### Sample response

A successful response returns `null` for errors:

```json
{
"data": {
"syntheticsDeletePrivateLocation": {
"errors": null
}
}
}
```

If there are any issues deleting the private location, the `errors` array will contain objects with `description` and `type` fields explaining what went wrong.
Loading
Loading