v1

latestOpenAPI 3.0.02026-07-142351,1971.3 MB
Synthetics

Edit an API test

Edit the configuration of a Synthetic API test.

put/api/v1/synthetics/tests/api/{public_id}

Path parameters

public_idstring required

The public ID of the test to get details from.

Request body

locationsstring[] required

Array of locations used to run the test.

messagestring required

Notification message associated with the test.

monitor_idinteger

The associated monitor ID.

namestring required

Name of the test.

public_idstring

The public ID for the test.

status'live' | 'paused'

Define whether you want to start (live) or pause (paused) a Synthetic test.

subtype'http' | 'ssl' | 'tcp' | 'dns' | 'multi' | 'icmp' | 'udp' | 'websocket' | 'grpc'

The subtype of the Synthetic API test, http, ssl, tcp, dns, icmp, udp, websocket, grpc or multi.

tagsstring[]

Array of tags attached to the test.

type'api' required

Type of the Synthetic test, api.

Example request

{
  "config": {
    "assertions": [
      {
        "operator": "lessThan",
        "target": 1000,
        "type": "responseTime"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        },
        {
          "day": 3,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    }
  },
  "public_id": "123-abc-456",
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}

Response

OK

locationsstring[] required

Array of locations used to run the test.

messagestring required

Notification message associated with the test.

monitor_idinteger

The associated monitor ID.

namestring required

Name of the test.

public_idstring

The public ID for the test.

status'live' | 'paused'

Define whether you want to start (live) or pause (paused) a Synthetic test.

subtype'http' | 'ssl' | 'tcp' | 'dns' | 'multi' | 'icmp' | 'udp' | 'websocket' | 'grpc'

The subtype of the Synthetic API test, http, ssl, tcp, dns, icmp, udp, websocket, grpc or multi.

tagsstring[]

Array of tags attached to the test.

type'api' required

Type of the Synthetic test, api.

Example response

{
  "config": {
    "assertions": [
      {
        "operator": "lessThan",
        "target": 1000,
        "type": "responseTime"
      }
    ],
    "request": {
      "method": "GET",
      "url": "https://example.com"
    }
  },
  "locations": [
    "aws:eu-west-3"
  ],
  "message": "Notification message",
  "monitor_id": 12345678,
  "name": "Example test name",
  "options": {
    "ci": {
      "executionRule": "blocking"
    },
    "device_ids": [
      "chrome.laptop_large"
    ],
    "restricted_roles": [
      "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    ],
    "rumSettings": {
      "applicationId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "clientTokenId": 12345,
      "isEnabled": true
    },
    "scheduling": {
      "timeframes": [
        {
          "day": 1,
          "from": "07:00",
          "to": "16:00"
        },
        {
          "day": 3,
          "from": "07:00",
          "to": "16:00"
        }
      ],
      "timezone": "America/New_York"
    }
  },
  "public_id": "123-abc-456",
  "status": "live",
  "subtype": "http",
  "tags": [
    "env:production"
  ],
  "type": "api"
}