Uptime sites

Update a site

Updates an uptime monitoring site.

patch/projects/{project_id}/sites/{site_id}

Request

Path parameters

project_idstring required
Example:Xk9mZp

Project ID

site_idstring uuid required
Example:9f8b6d2e-4c1a-4b7f-9e35-2a6c8d0f1b47

Site identifier (uuid)

Request body

namestring

Name shown for the site in Honeybadger and on status pages.

urlstring uri

Must start with http:// or https://, with no surrounding whitespace.

match_type'success' | 'exact' | 'include' | 'exclude' | 'jmespath'

How a response is judged. success: any 2xx; match must be left out. exact: the response status code equals match. include / exclude: the body does / doesn't contain match. jmespath: match is a JMESPath expression evaluated against the JSON body; numbers in it use backticks, not quotes.

matchstring nullable

What match_type compares against (see SiteMatchType). Required unless match_type is success, and must be left out with success. Null clears it.

request_method'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'
validate_sslboolean nullable

Fail the check when the TLS certificate does not validate. Null resets it to true.

request_bodystring password nullable

Body to send with the request, up to 32 KB. Null clears it.

request_headersobject nullable

Headers to send with the request, as header name to value. Replaces the stored headers; null or {} clears them.

frequency1 | 2 | 5 | 15

Minutes between checks. A value below the plan's floor is refused.

locationsSiteLocation[] nullable

A set of location names to check from. Null or empty means every location. A set; order is ignored and duplicates are dropped.

outage_thresholdinteger nullable

Consecutive failures before an outage is declared. null means down once failures reach 50% of locations.

activeboolean nullable

Whether monitoring is active. After 740 consecutive failed checks the server sets it to false. Null resets it to true.

timeoutinteger nullable

Request timeout in seconds, 1 to 120, default 30, and less than the frequency in seconds. Changing it requires the uptime timeout feature on the account; without it, only the current value (on create, the default) is accepted. Null resets it to the default.

Example request

{
  "name": "Marketing site",
  "url": "https://www.example.com/health",
  "match": "status == 'ok'",
  "request_headers": {
    "Authorization": "Bearer abc123"
  }
}

Response

Success

Example response

{
  "data": {
    "id": "9f8b6d2e-4c1a-4b7f-9e35-2a6c8d0f1b47",
    "project_id": "Xk9mZp",
    "name": "Production App",
    "url": "https://app.example.com",
    "state": "up",
    "locations": [
      "Virginia",
      "London"
    ],
    "outage_threshold": 2,
    "timeout": 30,
    "links": {
      "web": "https://app.honeybadger.io/projects/Xk9mZp"
    }
  },
  "meta": {
    "request_id": "6f1c2b0e-8d4a-4f6e-9b2a-3c5d7e9f1a2b"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.