Autoresearch

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

Endpoints

GET
GET
PATCH
DELETE
POST
GET
POST
POST
POST

Retrieve autoresearch training runs history

Return recent completed training runs and their iteration trails so a new run can learn from what was already tried. Scoped to this pipeline first, then same-target sibling pipelines on the team. Read this before iterating to reuse winning features and avoid repeating discarded approaches.

Required API key scopes

autoresearch:read

Path parameters

  • pipeline_id
    string

Query parameters

  • limit
    integer
    Default: 5

Response


Example request

GET /api/projects/:project_id/autoresearch/:pipeline_id/training_runs/history
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/autoresearch/:pipeline_id/training_runs/history/

Example response

Status 200 Prior completed training runs with their iteration trails, for orienting a new run.
RESPONSE
{
"runs": [
{
"run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
"pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
"is_current_pipeline": true,
"target_event": "string",
"horizon_days": 0,
"best_holdout_score": 0,
"iteration_count": 0,
"completed_at": "2019-08-24T14:15:22Z",
"summary": {
"target_event": "string",
"horizon_days": 0,
"best_holdout_score": 0,
"champion_promoted": true,
"champion_model_class": "string",
"kept_ladder": [
{
"iteration_number": 0,
"holdout_score": 0,
"model_class": "string",
"agent_description": "string"
}
],
"dead_ends": [
{
"iteration_number": 0,
"holdout_score": 0,
"model_class": "string",
"agent_description": "string"
}
],
"recommended_next": "string",
"distillation": "string",
"report_notebook_short_id": ""
},
"iterations": [
{
"iteration_number": -2147483648,
"status": "kept",
"holdout_score": 0,
"train_score": 0,
"agent_description": "string",
"summary": "string",
"headline": "string",
"model_spec": {
"model_class": "sklearn.linear_model.LogisticRegression",
"model_params": {
"C": 1
}
},
"recipe_snapshot": {
"feature_sql": "SELECT a.person_id AS distinct_id, countIf(e.event = '$pageview') AS pageviews FROM {anchors} a LEFT JOIN events e ON e.person_id = a.person_id AND e.timestamp < a.cutoff_ts GROUP BY a.person_id, a.cutoff_ts",
"feature_transforms": []
}
}
]
}
]
}

Retrieve autoresearch training runs history

Return recent completed training runs and their iteration trails so a new run can learn from what was already tried. Scoped to this pipeline first, then same-target sibling pipelines on the team. Read this before iterating to reuse winning features and avoid repeating discarded approaches.

Required API key scopes

autoresearch:read

Path parameters

  • pipeline_id
    string

Query parameters

  • limit
    integer
    Default: 5

Response


Example request

GET /api/projects/:project_id/autoresearch/:pipeline_id/training_runs/history
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/autoresearch/:pipeline_id/training_runs/history/

Example response

Status 200 Prior completed training runs with their iteration trails, for orienting a new run.
RESPONSE
{
"runs": [
{
"run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
"pipeline_id": "ec036e81-7903-4e4d-bbfa-ac8516341cf0",
"is_current_pipeline": true,
"target_event": "string",
"horizon_days": 0,
"best_holdout_score": 0,
"iteration_count": 0,
"completed_at": "2019-08-24T14:15:22Z",
"summary": {
"target_event": "string",
"horizon_days": 0,
"best_holdout_score": 0,
"champion_promoted": true,
"champion_model_class": "string",
"kept_ladder": [
{
"iteration_number": 0,
"holdout_score": 0,
"model_class": "string",
"agent_description": "string"
}
],
"dead_ends": [
{
"iteration_number": 0,
"holdout_score": 0,
"model_class": "string",
"agent_description": "string"
}
],
"recommended_next": "string",
"distillation": "string",
"report_notebook_short_id": ""
},
"iterations": [
{
"iteration_number": -2147483648,
"status": "kept",
"holdout_score": 0,
"train_score": 0,
"agent_description": "string",
"summary": "string",
"headline": "string",
"model_spec": {
"model_class": "sklearn.linear_model.LogisticRegression",
"model_params": {
"C": 1
}
},
"recipe_snapshot": {
"feature_sql": "SELECT a.person_id AS distinct_id, countIf(e.event = '$pageview') AS pageviews FROM {anchors} a LEFT JOIN events e ON e.person_id = a.person_id AND e.timestamp < a.cutoff_ts GROUP BY a.person_id, a.cutoff_ts",
"feature_transforms": []
}
}
]
}
]
}

Retrieve autoresearch

Manage autoresearch prediction pipelines.

A pipeline defines a target event, population, and horizon. The autoresearch training loop finds the best predictive recipe; the inference workflow scores users daily and emits autoresearch_prediction events.

Required API key scopes

autoresearch:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}

Retrieve autoresearch

Manage autoresearch prediction pipelines.

A pipeline defines a target event, population, and horizon. The autoresearch training loop finds the best predictive recipe; the inference workflow scores users daily and emits autoresearch_prediction events.

Required API key scopes

autoresearch:read

Path parameters

  • id
    string

Response


Example request

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

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}

Update autoresearch

Manage autoresearch prediction pipelines.

A pipeline defines a target event, population, and horizon. The autoresearch training loop finds the best predictive recipe; the inference workflow scores users daily and emits autoresearch_prediction events.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
  • target_event
    string
  • target_definition
  • horizon_days
    integer
  • training_lookback_days
    integer
  • training_population
    object
  • inference_population
    object
  • cadence_days
    integer
  • iteration_budget
    integer
  • iterations_per_run
    integer
  • research_interval_days
  • agent_model
    string | null
  • agent_reasoning_effort
    string | null
  • success_auc
    number | null
  • plateau_iterations
    integer
  • output_person_property
    string
  • write_person_property
    boolean

Response


Example request

PATCH /api/projects/:project_id/autoresearch/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/autoresearch/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}

Update autoresearch

Manage autoresearch prediction pipelines.

A pipeline defines a target event, population, and horizon. The autoresearch training loop finds the best predictive recipe; the inference workflow scores users daily and emits autoresearch_prediction events.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Request parameters

  • name
    string
  • description
    string
  • target_event
    string
  • target_definition
  • horizon_days
    integer
  • training_lookback_days
    integer
  • training_population
    object
  • inference_population
    object
  • cadence_days
    integer
  • iteration_budget
    integer
  • iterations_per_run
    integer
  • research_interval_days
  • agent_model
    string | null
  • agent_reasoning_effort
    string | null
  • success_auc
    number | null
  • plateau_iterations
    integer
  • output_person_property
    string
  • write_person_property
    boolean

Response


Example request

PATCH /api/projects/:project_id/autoresearch/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/autoresearch/:id/\
-d name="string"

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}

Delete autoresearch

Manage autoresearch prediction pipelines.

A pipeline defines a target event, population, and horizon. The autoresearch training loop finds the best predictive recipe; the inference workflow scores users daily and emits autoresearch_prediction events.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Example request

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

Example response

Status 204 The pipeline and its rows were deleted.
Status 400 A training run is in progress for this pipeline.
Status 404 The pipeline does not exist or is archived.

Delete autoresearch

Manage autoresearch prediction pipelines.

A pipeline defines a target event, population, and horizon. The autoresearch training loop finds the best predictive recipe; the inference workflow scores users daily and emits autoresearch_prediction events.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Example request

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

Example response

Status 204 The pipeline and its rows were deleted.
Status 400 A training run is in progress for this pipeline.
Status 404 The pipeline does not exist or is archived.

Create autoresearch archive

Soft-delete a pipeline. Stops daily scoring and training. Predictions and metrics are preserved. When write_person_property is on, a cleanup run removes output_person_property from the people it scored. Refused while a training run is in progress.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/archive
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/projects/:project_id/autoresearch/:id/archive/

Example response

Status 200 The pipeline after archiving.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}
Status 400 A training run is in progress for this pipeline.
Status 404 The pipeline does not exist or is archived.

Create autoresearch archive

Soft-delete a pipeline. Stops daily scoring and training. Predictions and metrics are preserved. When write_person_property is on, a cleanup run removes output_person_property from the people it scored. Refused while a training run is in progress.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/archive
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/projects/:project_id/autoresearch/:id/archive/

Example response

Status 200 The pipeline after archiving.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}
Status 400 A training run is in progress for this pipeline.
Status 404 The pipeline does not exist or is archived.

Retrieve autoresearch online performance

Return the realized metrics online validation recorded for each model on each validated prediction date, newest date first. Each row has realized AUC with a 95% interval, Brier score, calibration error, quantile calibration bins, mean predicted probability against the base rate, lift, and the model's role when it emitted and now. The rows come from the validation runs, so a former champion that a promotion archived keeps its history. Read-only; it runs no queries.

Required API key scopes

autoresearch:read

Path parameters

  • id
    string

Query parameters

  • limit
    integer
    Default: 60

Response


Example request

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

Example response

Status 200 Realized metrics per model per validated prediction date, newest date first.
RESPONSE
{
"rows": [
{
"validation_run_id": "0a393aa5-1729-4432-8173-bd3a43c67a2c",
"prediction_date": "2019-08-24",
"horizon_days": 0,
"weekday": 0,
"model_id": "f8ff2fb8-4acc-4e48-bd83-cbdac23e1224",
"emitted_role": "string",
"current_role": "string",
"n_scored": 0,
"n_positive": 0,
"base_rate": 0.1,
"mean_p_y": 0,
"realized_auc": 0,
"realized_auc_ci_low": 0,
"realized_auc_ci_high": 0,
"brier_score": 0,
"calibration_error": 0,
"lift_at_10": 0,
"lift_at_20": 0,
"average_precision": 0,
"confusion": {
"top_10": {
"tp": 0,
"fp": 0,
"fn": 0,
"tn": 0,
"n_flagged": 0,
"precision": 0,
"recall": 0
},
"top_20": {
"tp": 0,
"fp": 0,
"fn": 0,
"tn": 0,
"n_flagged": 0,
"precision": 0,
"recall": 0
},
"likely": {
"tp": 0,
"fp": 0,
"fn": 0,
"tn": 0,
"n_flagged": 0,
"precision": 0,
"recall": 0
}
},
"likely_threshold": 0,
"calibration_bins": [
{
"n": 0,
"mean_p_y": 0.1,
"positive_rate": 0.1
}
],
"warning": "string",
"validated_at": "2019-08-24T14:15:22Z"
}
],
"segment_thresholds": {
"likely_threshold": 0.1,
"possible_threshold": 0.1,
"likely_lift": 0.1,
"base_rate": 0,
"base_rate_dates": 0,
"base_rate_source": "realized",
"champion_mean_p_y": 0,
"champion_base_rate": 0,
"scores_miscalibrated": true
}
}
Status 404 The pipeline does not exist.

Retrieve autoresearch online performance

Return the realized metrics online validation recorded for each model on each validated prediction date, newest date first. Each row has realized AUC with a 95% interval, Brier score, calibration error, quantile calibration bins, mean predicted probability against the base rate, lift, and the model's role when it emitted and now. The rows come from the validation runs, so a former champion that a promotion archived keeps its history. Read-only; it runs no queries.

Required API key scopes

autoresearch:read

Path parameters

  • id
    string

Query parameters

  • limit
    integer
    Default: 60

Response


Example request

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

Example response

Status 200 Realized metrics per model per validated prediction date, newest date first.
RESPONSE
{
"rows": [
{
"validation_run_id": "0a393aa5-1729-4432-8173-bd3a43c67a2c",
"prediction_date": "2019-08-24",
"horizon_days": 0,
"weekday": 0,
"model_id": "f8ff2fb8-4acc-4e48-bd83-cbdac23e1224",
"emitted_role": "string",
"current_role": "string",
"n_scored": 0,
"n_positive": 0,
"base_rate": 0.1,
"mean_p_y": 0,
"realized_auc": 0,
"realized_auc_ci_low": 0,
"realized_auc_ci_high": 0,
"brier_score": 0,
"calibration_error": 0,
"lift_at_10": 0,
"lift_at_20": 0,
"average_precision": 0,
"confusion": {
"top_10": {
"tp": 0,
"fp": 0,
"fn": 0,
"tn": 0,
"n_flagged": 0,
"precision": 0,
"recall": 0
},
"top_20": {
"tp": 0,
"fp": 0,
"fn": 0,
"tn": 0,
"n_flagged": 0,
"precision": 0,
"recall": 0
},
"likely": {
"tp": 0,
"fp": 0,
"fn": 0,
"tn": 0,
"n_flagged": 0,
"precision": 0,
"recall": 0
}
},
"likely_threshold": 0,
"calibration_bins": [
{
"n": 0,
"mean_p_y": 0.1,
"positive_rate": 0.1
}
],
"warning": "string",
"validated_at": "2019-08-24T14:15:22Z"
}
],
"segment_thresholds": {
"likely_threshold": 0.1,
"possible_threshold": 0.1,
"likely_lift": 0.1,
"base_rate": 0,
"base_rate_dates": 0,
"base_rate_source": "realized",
"champion_mean_p_y": 0,
"champion_base_rate": 0,
"scores_miscalibrated": true
}
}
Status 404 The pipeline does not exist.

Create autoresearch pause

Pause daily scoring and training on a running pipeline. The pipeline can be resumed later. A training run already in progress finishes and can promote a new champion, but the pipeline stays paused and scores nobody until it is resumed.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/pause
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/projects/:project_id/autoresearch/:id/pause/

Example response

Status 200 The pipeline after pausing.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}
Status 400 The pipeline is not running.
Status 404 The pipeline does not exist or is archived.

Create autoresearch pause

Pause daily scoring and training on a running pipeline. The pipeline can be resumed later. A training run already in progress finishes and can promote a new champion, but the pipeline stays paused and scores nobody until it is resumed.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/pause
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/projects/:project_id/autoresearch/:id/pause/

Example response

Status 200 The pipeline after pausing.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}
Status 400 The pipeline is not running.
Status 404 The pipeline does not exist or is archived.

Create autoresearch resume

Resume a paused pipeline. Daily scoring and training will restart on the next cadence tick.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/resume
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/projects/:project_id/autoresearch/:id/resume/

Example response

Status 200 The pipeline after resuming.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}
Status 400 The pipeline is not paused.
Status 404 The pipeline does not exist or is archived.

Create autoresearch resume

Resume a paused pipeline. Daily scoring and training will restart on the next cadence tick.

Required API key scopes

autoresearch:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/resume
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/projects/:project_id/autoresearch/:id/resume/

Example response

Status 200 The pipeline after resuming.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string",
"description": "string",
"target_event": "string",
"target_definition": {
"type": "event"
},
"horizon_days": -2147483648,
"training_lookback_days": -2147483648,
"training_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"inference_population": {
"properties": [
{
"key": "email",
"type": "person",
"operator": "is_set"
}
]
},
"cadence_days": -2147483648,
"iteration_budget": -2147483648,
"iteration_budget_remaining": 0,
"iterations_per_run": 0,
"research_interval_days": 7,
"agent_model": "string",
"agent_reasoning_effort": "string",
"effective_agent_model": "string",
"effective_agent_reasoning_effort": "string",
"training_phase": "explore",
"next_research_at": "2019-08-24T14:15:22Z",
"success_auc": 0,
"plateau_iterations": -2147483648,
"output_person_property": "string",
"write_person_property": true,
"status": "draft",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"last_scored_at": "2019-08-24T14:15:22Z",
"champion_holdout_auc": 0,
"champion_realized_auc": 0,
"champion_lift_at_10": 0,
"champion_is_preliminary": true,
"champion_realized_auc_trend": [
{
"prediction_date": "2019-08-24",
"realized_auc": 0.1
}
],
"champion_training_trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
],
"people_scored": 0,
"likely_count": 0,
"likely_threshold": 0,
"first_check_expected_at": "2019-08-24T14:15:22Z",
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"training_run_count": 0,
"experiment_count": 0,
"live_training_run": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"iteration_budget": 0,
"experiment_count": 0,
"best_holdout_score": 0,
"latest_agent_description": "string",
"latest_summary": "string",
"trend": [
{
"iteration_number": 0,
"best_holdout_score": 0.1
}
]
}
}
Status 400 The pipeline is not paused.
Status 404 The pipeline does not exist or is archived.

Create autoresearch score

Start scoring the inference population using the champion model. Scoring runs in the background: it emits autoresearch_prediction events for each scored user and sets the pipeline's output_person_property on each scored person. The response returns at once with the running run. A second request while a run is running returns that run and starts nothing. The daily Temporal inference workflow also scores each pipeline on its cadence.

Required API key scopes

autoresearch:writequery:readperson:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/score
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/projects/:project_id/autoresearch/:id/score/

Example response

Status 200 The inference run, with status running. If a run for the pipeline is already running, this is that run. Poll the run until its status is completed or failed.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"pipeline": "84876997-3a84-47a2-8c28-237e28b9b816",
"model": "a047ecae-0f27-4ff4-95bb-0f06d1225aa8",
"run_type": "inference",
"status": "pending",
"rows_scored": -2147483648,
"metrics": {},
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"error": "string",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z"
}
Status 400 The pipeline has no champion model or is paused, or an action target needs the action:read scope.
Status 404 The pipeline does not exist or is archived.

Create autoresearch score

Start scoring the inference population using the champion model. Scoring runs in the background: it emits autoresearch_prediction events for each scored user and sets the pipeline's output_person_property on each scored person. The response returns at once with the running run. A second request while a run is running returns that run and starts nothing. The daily Temporal inference workflow also scores each pipeline on its cadence.

Required API key scopes

autoresearch:writequery:readperson:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/autoresearch/:id/score
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/projects/:project_id/autoresearch/:id/score/

Example response

Status 200 The inference run, with status running. If a run for the pipeline is already running, this is that run. Poll the run until its status is completed or failed.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"pipeline": "84876997-3a84-47a2-8c28-237e28b9b816",
"model": "a047ecae-0f27-4ff4-95bb-0f06d1225aa8",
"run_type": "inference",
"status": "pending",
"rows_scored": -2147483648,
"metrics": {},
"coverage": {
"population": 0,
"with_score": 0,
"never_scored": 0,
"age_days_avg": 0,
"age_days_p50": 0,
"age_days_p90": 0,
"age_days_max": 0,
"lookback_days": 0
},
"error": "string",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z"
}
Status 400 The pipeline has no champion model or is paused, or an action target needs the action:read scope.
Status 404 The pipeline does not exist or is archived.