traffic-exclusions

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-traffic-exclusions"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/0b086a85-a7e3-4ffb-845b-b647d5a89666/social-card.svg?v=3e7ae33eec8b" alt="traffic-exclusions" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/traffic-exclusionsScope settings:read

Parameters

project_idstringpathrequired
trashbooleanquery

Code samples

cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/traffic-exclusions"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "deleted_at": "2024-01-01T00:00:00Z",
      "enabled": true,
      "id": "string",
      "key": "string",
      "kind": "string",
      "note": "string",
      "value": "string"
    }
  ],
  "next_cursor": "string"
}
Schema
dataobject[]required
Show child parameters
created_atstringrequired
deleted_atstring
Set while the rule is in the trash (restorable).
enabledbooleanrequired
idstringrequired
keystring
*_property rules: the property key.
kindstringrequired
ip_cidr | hostname | path | event_property | person_property
notestringrequired
valuestringrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/traffic-exclusionsScope settings:write

Parameters

project_idstringpathrequired

Request body

application/json
keystring
Required for *_property: the property key.
kindstringrequired
ip_cidr | hostname | path | distinct_id | event_property | person_property
notestring
valuestringrequired
ip_cidr: address or CIDR (needs IP capture on); hostname / path / distinct_id: exact or * glob; *_property: the value that marks traffic to hide.
{
  "key": "string",
  "kind": "string",
  "note": "string",
  "value": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/traffic-exclusions" \
  -H "Content-Type: application/json" \
  -d '{"key":"string","kind":"string","note":"string","value":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "deleted_at": "2024-01-01T00:00:00Z",
  "enabled": true,
  "id": "string",
  "key": "string",
  "kind": "string",
  "note": "string",
  "value": "string"
}
Schema
created_atstringrequired
deleted_atstring
Set while the rule is in the trash (restorable).
enabledbooleanrequired
idstringrequired
keystring
*_property rules: the property key.
kindstringrequired
ip_cidr | hostname | path | event_property | person_property
notestringrequired
valuestringrequired
400
403
404
POSThttps://lucidace.com/v1/projects/{project_id}/traffic-exclusions/previewScope settings:read

Parameters

project_idstringpathrequired

Request body

application/json
daysinteger
Look-back in days (default 30, at most 365).
rulesRuleBody[]required
Draft rules (1 to 100), counted together.
Show child parameters
keystring
Required for *_property: the property key.
kindstringrequired
ip_cidr | hostname | path | distinct_id | event_property | person_property
notestring
valuestringrequired
ip_cidr: address or CIDR (needs IP capture on); hostname / path / distinct_id: exact or * glob; *_property: the value that marks traffic to hide.
{
  "days": 0,
  "rules": [
    {
      "key": "string",
      "kind": "string",
      "note": "string",
      "value": "string"
    }
  ]
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/traffic-exclusions/preview" \
  -H "Content-Type: application/json" \
  -d '{"days":0,"rules":[{"key":"string","kind":"string","note":"string","value":"string"}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200
Example
{
  "days": 0,
  "events": 0,
  "persons": 0,
  "sessions": 0
}
Schema
daysintegerrequired
eventsintegerrequired
Matching events, sessions and people the rules would hide.
personsintegerrequired
sessionsintegerrequired
400
404
503
DELETEhttps://lucidace.com/v1/projects/{project_id}/traffic-exclusions/{id}Scope settings:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X DELETE "https://lucidace.com/v1/projects/{project_id}/traffic-exclusions/{id}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 the rule, now in the trash (restorable)

Same as 201 · POST /v1/projects/{project_id}/traffic-exclusions

403
404
PATCHhttps://lucidace.com/v1/projects/{project_id}/traffic-exclusions/{id}Scope settings:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
enabledbooleanrequired
{
  "enabled": true
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/traffic-exclusions/{id}" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

403
404
POSThttps://lucidace.com/v1/projects/{project_id}/traffic-exclusions/{id}/restoreScope settings:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/traffic-exclusions/{id}/restore"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
Updated