PilotFoxDocs

Get a site

GET
/api/v1/sites/{siteId}

Members and API keys holding site:read get the whole site (kind, settings, creation date, their role and permissions); everyone else (share links, the public on a public site) gets its id, name, domain and time zone only.

Requires analytics:read on the site (an API key, or a signed-in member's role). Share links: allowed, with the analytics:read scope. Public sites: open to everyone, no credential needed.

Authorization

headerx-api-key<token>

An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).

Scope: analytics:read

Path Parameters

siteId*string

Response Body

OK

application/json
  1. response
data*|
Example Request
curl -X GET 'https://pilotfox.app/api/v1/sites/string'
Example Response200
{  "data": {    "id": "string",    "name": "string",    "domain": "string",    "timezone": "string",    "kind": "web",    "settings": {      "tracking": {        "initialPageview": true,        "spa": true,        "hashRouting": false,        "querystring": true,        "outbound": true,        "clicks": false,        "forms": false,        "copy": false,        "inputs": false,        "errors": false,        "vitals": false,        "paymentLinks": true      },      "replay": {        "enabled": false,        "sampleRate": 100,        "maskAllInputs": true,        "maskTextSelector": null,        "blockSelector": null,        "minDurationSeconds": 0      },      "identity": {        "mode": "stable"      },      "privacy": {        "storeQuerystringParams": "all",        "stripParams": [],        "respectGpc": true      },      "allowedHostnames": [],      "exclusions": {        "ips": [],        "countries": [],        "paths": [],        "userAgents": [],        "asns": []      },      "bots": {        "block": true      },      "revenue": {        "currency": "usd",        "storeCustomerEmail": false,        "attributionModel": "last_non_direct",        "attributionWindowDays": 90      },      "affiliates": {        "params": [          "ref"        ],        "windowDays": 30      },      "public": false,      "primaryGoalId": null    },    "createdAt": "2019-08-24T14:15:22Z",    "role": "owner",    "permissions": {      "property1": [        "string"      ],      "property2": [        "string"      ]    }  }}