query_definitions

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-query-definitions"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/bbeda081-2ce9-43db-b7c7-1212b1c4a6a6/social-card.svg?v=3e7ae33eec8b" alt="query_definitions" width="600" height="315"></a>
GEThttps://lucidace.com/v1/projects/{project_id}/query_definitionsScope insight:read

Parameters

project_idstringpathrequired

Code samples

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

Responses

200 Page of QueryDefinition by kind and name (at most 500; one page)
Example
{
  "data": [
    {
      "created_at": "2024-01-01T00:00:00Z",
      "description": "string",
      "id": "string",
      "kind": "string",
      "name": "string",
      "source": "string",
      "steps": {},
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "next_cursor": "string"
}
Schema
dataQueryDefinition[]required
Show child parameters
created_atstringrequired
descriptionstringrequired
idstringrequired
kindstringrequired
alias | property_alias | virtual
namestringrequired
sourcestring
Stored event name (alias) or property key (property alias).
stepsobject
Virtual events: action-step alternatives, OR-ed.
updated_atstringrequired
next_cursorstring
404
POSThttps://lucidace.com/v1/projects/{project_id}/query_definitionsScope insight:write

Parameters

project_idstringpathrequired

Request body

application/json
descriptionstring
kindstringrequired
alias | property_alias | virtual
namestringrequired
The name queries use; 1 to 200 characters.
sourcestring
Stored event name (alias) or property key (property_alias).
stepsarray
virtual: 1 to 20 alternatives ({event, properties?, selector?, ...}), OR-ed.
{
  "description": "string",
  "kind": "string",
  "name": "string",
  "source": "string",
  "steps": [
    {}
  ]
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/projects/{project_id}/query_definitions" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","kind":"string","name":"string","source":"string","steps":[{}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201
Example
{
  "created_at": "2024-01-01T00:00:00Z",
  "description": "string",
  "id": "string",
  "kind": "string",
  "name": "string",
  "source": "string",
  "steps": {},
  "updated_at": "2024-01-01T00:00:00Z"
}
Schema
created_atstringrequired
descriptionstringrequired
idstringrequired
kindstringrequired
alias | property_alias | virtual
namestringrequired
sourcestring
Stored event name (alias) or property key (property alias).
stepsobject
Virtual events: action-step alternatives, OR-ed.
updated_atstringrequired
400
403
404
409
DELETEhttps://lucidace.com/v1/projects/{project_id}/query_definitions/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Code samples

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

Responses

204
403
404
PATCHhttps://lucidace.com/v1/projects/{project_id}/query_definitions/{id}Scope insight:write

Parameters

project_idstringpathrequired
idstringpathrequired

Request body

application/json
descriptionstring
sourcestring
stepsarray
{
  "description": "string",
  "source": "string",
  "steps": [
    {}
  ]
}

Code samples

cURL
curl -X PATCH "https://lucidace.com/v1/projects/{project_id}/query_definitions/{id}" \
  -H "Content-Type: application/json" \
  -d '{"description":"string","source":"string","steps":[{}]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

400
403
404
Updated