Environments-7

For instructions on how to authenticate to use this endpoint, see API overview.

Hard delete of this model is not allowed. Use a patch API call to set "deleted" to true

Endpoints

DELETE
GET
POST
GET
PATCH
DELETE
POST
GET
POST
GET
PATCH
DELETE
GET
POST
GET
GET
POST

Delete environments datasets

Required API key scopes

dataset:write

Path parameters

  • id
    string

    A UUID string identifying this dataset.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

DELETE /api/environments/:project_id/datasets/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/datasets/:id/

Example response

Status 405 No response body

Delete environments datasets

Required API key scopes

dataset:write

Path parameters

  • id
    string

    A UUID string identifying this dataset.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

DELETE /api/environments/:project_id/datasets/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/datasets/:id/

Example response

Status 405 No response body

List all environments desktop recordings

RESTful API for managing desktop meeting recordings.

Standard CRUD operations plus transcript management as a subresource.

Required API key scopes

desktop_recording:read

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Query parameters

  • limit
    integer

    Number of results to return per page.

  • offset
    integer

    The initial index from which to return the results.


Response


Example request

GET /api/environments/:project_id/desktop_recordings
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/desktop_recordings/

Example response

Status 200
RESPONSE
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"team": 0,
"created_by": 0,
"sdk_upload_id": "7276e323-83a6-4edf-893f-03d54726eb02",
"recall_recording_id": "08cce185-c34b-4d4f-bb61-49c99f8ccc30",
"platform": "zoom",
"meeting_title": "string",
"meeting_url": "http://example.com",
"duration_seconds": -2147483648,
"status": "recording",
"notes": "string",
"error_message": "string",
"video_url": "http://example.com",
"video_size_bytes": -9223372036854776000,
"participants": [
"string"
],
"transcript_text": "string",
"transcript_segments": [
{
"timestamp": 0.1,
"speaker": "string",
"text": "string",
"confidence": 0.1,
"is_final": true
}
],
"summary": "string",
"extracted_tasks": [
{
"title": "string",
"description": "string",
"assignee": "string"
}
],
"tasks_generated_at": "2019-08-24T14:15:22Z",
"summary_generated_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}

Create environments desktop recordings

Create a new recording and get Recall.ai upload token for the desktop SDK

Required API key scopes

desktop_recording:write

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • platform
    Default: desktop_audio

    Meeting platform being recorded

    • zoom - zoom
    • teams - teams
    • meet - meet
    • desktop_audio - desktop_audio
    • slack - slack

Response


Example request

POST /api/environments/:project_id/desktop_recordings
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/desktop_recordings/\
-d platform=undefined

Example response

Status 201
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"team": 0,
"created_by": 0,
"sdk_upload_id": "7276e323-83a6-4edf-893f-03d54726eb02",
"recall_recording_id": "08cce185-c34b-4d4f-bb61-49c99f8ccc30",
"platform": "zoom",
"meeting_title": "string",
"meeting_url": "http://example.com",
"duration_seconds": -2147483648,
"status": "recording",
"notes": "string",
"error_message": "string",
"video_url": "http://example.com",
"video_size_bytes": -9223372036854776000,
"participants": [
"string"
],
"transcript_text": "string",
"transcript_segments": [
{
"timestamp": 0.1,
"speaker": "string",
"text": "string",
"confidence": 0.1,
"is_final": true
}
],
"summary": "string",
"extracted_tasks": [
{
"title": "string",
"description": "string",
"assignee": "string"
}
],
"tasks_generated_at": "2019-08-24T14:15:22Z",
"summary_generated_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"upload_token": "string"
}

Retrieve environments desktop recordings

RESTful API for managing desktop meeting recordings.

Standard CRUD operations plus transcript management as a subresource.

Required API key scopes

desktop_recording:read

Path parameters

  • id
    string

    A UUID string identifying this desktop recording.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Response


Example request

GET /api/environments/:project_id/desktop_recordings/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/desktop_recordings/:id/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"team": 0,
"created_by": 0,
"sdk_upload_id": "7276e323-83a6-4edf-893f-03d54726eb02",
"recall_recording_id": "08cce185-c34b-4d4f-bb61-49c99f8ccc30",
"platform": "zoom",
"meeting_title": "string",
"meeting_url": "http://example.com",
"duration_seconds": -2147483648,
"status": "recording",
"notes": "string",
"error_message": "string",
"video_url": "http://example.com",
"video_size_bytes": -9223372036854776000,
"participants": [
"string"
],
"transcript_text": "string",
"transcript_segments": [
{
"timestamp": 0.1,
"speaker": "string",
"text": "string",
"confidence": 0.1,
"is_final": true
}
],
"summary": "string",
"extracted_tasks": [
{
"title": "string",
"description": "string",
"assignee": "string"
}
],
"tasks_generated_at": "2019-08-24T14:15:22Z",
"summary_generated_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Update environments desktop recordings

RESTful API for managing desktop meeting recordings.

Standard CRUD operations plus transcript management as a subresource.

Required API key scopes

desktop_recording:write

Path parameters

  • id
    string

    A UUID string identifying this desktop recording.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • recall_recording_id
    string
  • platform
  • meeting_title
    string
  • meeting_url
    string
  • duration_seconds
    integer
  • status
  • notes
    string
  • error_message
    string
  • video_url
    string
  • video_size_bytes
    integer
  • participants
    array

    List of participant names

  • transcript_segments
    Click to open
    array

    Transcript segments with timestamps

  • summary
    string
  • extracted_tasks
    Click to open
    array

    AI-extracted tasks from transcript

  • tasks_generated_at
    string
  • summary_generated_at
    string
  • started_at
    string
  • completed_at
    string

Response


Example request

PATCH /api/environments/:project_id/desktop_recordings/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/desktop_recordings/:id/\
-d team="integer"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"team": 0,
"created_by": 0,
"sdk_upload_id": "7276e323-83a6-4edf-893f-03d54726eb02",
"recall_recording_id": "08cce185-c34b-4d4f-bb61-49c99f8ccc30",
"platform": "zoom",
"meeting_title": "string",
"meeting_url": "http://example.com",
"duration_seconds": -2147483648,
"status": "recording",
"notes": "string",
"error_message": "string",
"video_url": "http://example.com",
"video_size_bytes": -9223372036854776000,
"participants": [
"string"
],
"transcript_text": "string",
"transcript_segments": [
{
"timestamp": 0.1,
"speaker": "string",
"text": "string",
"confidence": 0.1,
"is_final": true
}
],
"summary": "string",
"extracted_tasks": [
{
"title": "string",
"description": "string",
"assignee": "string"
}
],
"tasks_generated_at": "2019-08-24T14:15:22Z",
"summary_generated_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Delete environments desktop recordings

RESTful API for managing desktop meeting recordings.

Standard CRUD operations plus transcript management as a subresource.

Required API key scopes

desktop_recording:write

Path parameters

  • id
    string

    A UUID string identifying this desktop recording.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

DELETE /api/environments/:project_id/desktop_recordings/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/desktop_recordings/:id/

Example response

Status 204 No response body

Create environments desktop recordings append segments

Append transcript segments (supports batched real-time streaming)

Required API key scopes

desktop_recording:write

Path parameters

  • id
    string

    A UUID string identifying this desktop recording.

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • segments
    Click to open
    array

Response


Example request

POST /api/environments/:project_id/desktop_recordings/:id/append_segments
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/desktop_recordings/:id/append_segments/\
-d segments="array"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"team": 0,
"created_by": 0,
"sdk_upload_id": "7276e323-83a6-4edf-893f-03d54726eb02",
"recall_recording_id": "08cce185-c34b-4d4f-bb61-49c99f8ccc30",
"platform": "zoom",
"meeting_title": "string",
"meeting_url": "http://example.com",
"duration_seconds": -2147483648,
"status": "recording",
"notes": "string",
"error_message": "string",
"video_url": "http://example.com",
"video_size_bytes": -9223372036854776000,
"participants": [
"string"
],
"transcript_text": "string",
"transcript_segments": [
{
"timestamp": 0.1,
"speaker": "string",
"text": "string",
"confidence": 0.1,
"is_final": true
}
],
"summary": "string",
"extracted_tasks": [
{
"title": "string",
"description": "string",
"assignee": "string"
}
],
"tasks_generated_at": "2019-08-24T14:15:22Z",
"summary_generated_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}

Retrieve environments endpoints

List all endpoints for the team.

Required API key scopes

endpoint:read

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

GET /api/environments/:project_id/endpoints
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/

Example response

Status 200 No response body

Create environments endpoints

Create a new endpoint

Required API key scopes

endpoint:write

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • cache_age_seconds
    number
  • derived_from_insight
    string
  • description
    string
  • is_active
    boolean
  • is_materialized
    boolean

    Whether this endpoint's query results are materialized to S3

  • name
    string
  • query
  • sync_frequency

    How frequently should the underlying materialized view be updated


Example request

POST /api/environments/:project_id/endpoints
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/\
-d cache_age_seconds="number"

Example response

Status 201 No response body

Retrieve environments endpoints retrieve

Retrieve an endpoint.

Required API key scopes

endpoint:read

Path parameters

  • name
    string

    URL-safe name for the endpoint

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

GET /api/environments/:project_id/endpoints/:name
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/:name/

Example response

Status 200 No response body

Update environments endpoints

Path parameters

  • name
    string

    URL-safe name for the endpoint

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

PATCH /api/environments/:project_id/endpoints/:name
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/:name/

Example response

Status 200 No response body

Delete environments endpoints

Delete an endpoint and clean up materialized query.

Required API key scopes

endpoint:write

Path parameters

  • name
    string

    URL-safe name for the endpoint

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

DELETE /api/environments/:project_id/endpoints/:name
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/:name/

Example response

Status 204 No response body

Retrieve environments endpoints run

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

Required API key scopes

endpoint:read

Path parameters

  • name
    string

    URL-safe name for the endpoint

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

GET /api/environments/:project_id/endpoints/:name/run
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/:name/run/

Example response

Status 200 No response body

Create environments endpoints run

Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.

Required API key scopes

endpoint:read

Path parameters

  • name
    string

    URL-safe name for the endpoint

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • client_query_id
    string

    Client provided query ID. Can be used to retrieve the status or cancel the query.

  • filters_override

    A map for overriding insight query filters.

    Tip: Use to get data for a specific customer or user.

  • query_override
    object

    Map of Insight query keys to be overridden at execution time. For example: Assuming query = {"kind": "TrendsQuery", "series": [{"kind": "EventsNode","name": "$pageview","event": "$pageview","math": "total"}]} If query_override = {"series": [{"kind": "EventsNode","name": "$identify","event": "$identify","math": "total"}]} The query executed will return the count of $identify events, instead of $pageview's

  • refresh
    Default: blocking

    Whether results should be calculated sync or async, and how much to rely on the cache:

    • 'blocking' - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
    • 'force_blocking' - calculate synchronously, even if fresh results are already cached
  • variables
    object

    A map for overriding HogQL query variables, where the key is the variable name and the value is the variable value. Variable must be set on the endpoint's query between curly braces (i.e. {variable.from_date}) For example: {"from_date": "1970-01-01"}


Example request

POST /api/environments/:project_id/endpoints/:name/run
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/:name/run/\
-d client_query_id="string"

Example response

Status 200 No response body

Retrieve environments endpoints versions

List all versions for an endpoint.

Required API key scopes

endpoint:read

Path parameters

  • name
    string

    URL-safe name for the endpoint

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Example request

GET /api/environments/:project_id/endpoints/:name/versions
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/:name/versions/

Example response

Status 200 No response body

Retrieve environments endpoints versions retrieve

Get details of a specific endpoint version.

Required API key scopes

endpoint:read

Path parameters

  • name
    string

    URL-safe name for the endpoint

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

  • version_number
    string

Example request

GET /api/environments/:project_id/endpoints/:name/versions/:version_number
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/:name/versions/:version_number/

Example response

Status 200 No response body

Create environments endpoints last execution times

Get the last execution times in the past 6 months for multiple endpoints.

Path parameters

  • project_id
    string

    Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.


Request parameters

  • names
    array

Response


Example request

POST /api/environments/:project_id/endpoints/last_execution_times
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/environments/:project_id/endpoints/last_execution_times/\
-d names="array"

Example response

Status 200
RESPONSE
{
"query_status": {
"complete": false,
"dashboard_id": null,
"end_time": null,
"error": false,
"error_message": null,
"expiration_time": null,
"id": "string",
"insight_id": null,
"labels": null,
"pickup_time": null,
"query_async": true,
"query_progress": {
"active_cpu_time": 0,
"bytes_read": 0,
"estimated_rows_total": 0,
"rows_read": 0,
"time_elapsed": 0
},
"results": null,
"start_time": null,
"task_id": null,
"team_id": 0
}
}
Next page →

Community questions

Questions about this page? or post a community question.