Sites

Change a site

Changes a site, made against the version you read: if the site has changed since, the request is refused with 409 version_conflict and nothing is applied. config merges onto the configuration in force: a field left out keeps its value and a list that is named replaces the whole list. A configuration that differs from the one in force becomes a new immutable version. Setting status to disabled stops collection without deleting anything. Needs analytics.sites.write.

patch/v1/sites/{siteId}

Request

  • Base URL: https://api.ironfang.com/analytics
  • URL: https://api.ironfang.com/analytics/v1/sites/{siteId}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Request body

namestring
retention_daysinteger

Raising it above session_retention_days raises that too.

session_retention_daysinteger

At least retention_days.

status'active' | 'disabled'
timezonestring
versioninteger required

The site version the change was made against.

Response

The site after the change

Example response

{
  "origins": [
    {
      "dns_record": {
        "name": "_ironfang-analytics.shop.example.com"
      },
      "origin": "https://shop.example.com"
    }
  ]
}

Changes

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