Visual

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

Endpoints

GET
GET
POST
GET
POST
POST
POST
POST
POST
GET

Retrieve visual review repos runs counts

Review state counts for runs in this repo.

Required API key scopes

visual_review:read

Path parameters

  • repo_id
    string

Response


Example request

GET /api/projects/:project_id/visual_review/repos/:repo_id/runs/counts
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/visual_review/repos/:repo_id/runs/counts/

Example response

Status 200
RESPONSE
{
"needs_review": 0,
"clean": 0,
"processing": 0,
"stale": 0
}

Retrieve visual review repos runs counts

Review state counts for runs in this repo.

Required API key scopes

visual_review:read

Path parameters

  • repo_id
    string

Response


Example request

GET /api/projects/:project_id/visual_review/repos/:repo_id/runs/counts
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/visual_review/repos/:repo_id/runs/counts/

Example response

Status 200
RESPONSE
{
"needs_review": 0,
"clean": 0,
"processing": 0,
"stale": 0
}

List all visual review repos snapshots

Deduped baseline timeline for a snapshot identity. Newest first.

Required API key scopes

visual_review:read

Path parameters

  • identifier
    string
  • repo_id
    string
  • run_type
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

GET /api/projects/:project_id/visual_review/repos/:repo_id/snapshots/:run_type/:identifier
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/visual_review/repos/:repo_id/snapshots/:run_type/:identifier/

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": [
{
"current_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
"snapshot_id": "163831af-8c1b-4992-a9cf-88c6306604c0",
"result": "string",
"branch": "string",
"commit_sha": "string",
"created_at": "2019-08-24T14:15:22Z",
"pr_number": 0,
"diff_percentage": 0.1,
"review_state": "string"
}
]
}

List all visual review repos snapshots

Deduped baseline timeline for a snapshot identity. Newest first.

Required API key scopes

visual_review:read

Path parameters

  • identifier
    string
  • repo_id
    string
  • run_type
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

GET /api/projects/:project_id/visual_review/repos/:repo_id/snapshots/:run_type/:identifier
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/visual_review/repos/:repo_id/snapshots/:run_type/:identifier/

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": [
{
"current_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
"snapshot_id": "163831af-8c1b-4992-a9cf-88c6306604c0",
"result": "string",
"branch": "string",
"commit_sha": "string",
"created_at": "2019-08-24T14:15:22Z",
"pr_number": 0,
"diff_percentage": 0.1,
"review_state": "string"
}
]
}

Create visual review runs

Create a new run from a CI manifest.

Required API key scopes

visual_review:write

Request parameters

  • repo_id
    string
  • run_type
    string
  • commit_sha
    string
  • branch
    string
  • snapshots
    Click to open
    array
  • pr_number
    integer
  • baseline_hashes
    object
  • unchanged_count
    integer
  • removed_identifiers
    array
  • purpose
    string
  • metadata
    object

Response


Example request

POST /api/projects/:project_id/visual_review/runs
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/visual_review/runs/\
-d repo_id="string",\
-d run_type="string",\
-d commit_sha="string",\
-d branch="string",\
-d snapshots="array"

Example response

Status 201
RESPONSE
{
"run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
"uploads": [
{
"content_hash": "string",
"url": "string",
"fields": {
"property1": "string",
"property2": "string"
}
}
]
}

Create visual review runs

Create a new run from a CI manifest.

Required API key scopes

visual_review:write

Request parameters

  • repo_id
    string
  • run_type
    string
  • commit_sha
    string
  • branch
    string
  • snapshots
    Click to open
    array
  • pr_number
    integer
  • baseline_hashes
    object
  • unchanged_count
    integer
  • removed_identifiers
    array
  • purpose
    string
  • metadata
    object

Response


Example request

POST /api/projects/:project_id/visual_review/runs
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/visual_review/runs/\
-d repo_id="string",\
-d run_type="string",\
-d commit_sha="string",\
-d branch="string",\
-d snapshots="array"

Example response

Status 201
RESPONSE
{
"run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
"uploads": [
{
"content_hash": "string",
"url": "string",
"fields": {
"property1": "string",
"property2": "string"
}
}
]
}

Retrieve visual review runs

Get run status and summary.

Required API key scopes

visual_review:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/visual_review/runs/: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/visual_review/runs/:id/

Example response

Status 200
RESPONSE
{
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
}

Retrieve visual review runs

Get run status and summary.

Required API key scopes

visual_review:read

Path parameters

  • id
    string

Response


Example request

GET /api/projects/:project_id/visual_review/runs/: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/visual_review/runs/:id/

Example response

Status 200
RESPONSE
{
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
}

Create visual review runs add snapshots

Add a batch of snapshots to a pending run (shard-based flow).

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Request parameters

  • snapshots
    Click to open
    array
  • baseline_hashes
    object

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/add-snapshots
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/visual_review/runs/:id/add-snapshots/\
-d snapshots="array"

Example response

Status 200
RESPONSE
{
"added": 0,
"uploads": [
{
"content_hash": "string",
"url": "string",
"fields": {
"property1": "string",
"property2": "string"
}
}
]
}

Create visual review runs add snapshots

Add a batch of snapshots to a pending run (shard-based flow).

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Request parameters

  • snapshots
    Click to open
    array
  • baseline_hashes
    object

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/add-snapshots
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/visual_review/runs/:id/add-snapshots/\
-d snapshots="array"

Example response

Status 200
RESPONSE
{
"added": 0,
"uploads": [
{
"content_hash": "string",
"url": "string",
"fields": {
"property1": "string",
"property2": "string"
}
}
]
}

Create visual review runs approve

Approve visual changes for snapshots in this run.

With approve_all=true, approves all changed+new snapshots and returns signed baseline YAML. With specific snapshots, approves only those.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Request parameters

  • snapshots
    Click to open
    array
  • approve_all
    boolean
  • commit_to_github
    boolean

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/approve
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/visual_review/runs/:id/approve/\
-d snapshots="array"

Example response

Status 200
RESPONSE
{
"run": {
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
},
"baseline_content": "string"
}

Create visual review runs approve

Approve visual changes for snapshots in this run.

With approve_all=true, approves all changed+new snapshots and returns signed baseline YAML. With specific snapshots, approves only those.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Request parameters

  • snapshots
    Click to open
    array
  • approve_all
    boolean
  • commit_to_github
    boolean

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/approve
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/visual_review/runs/:id/approve/\
-d snapshots="array"

Example response

Status 200
RESPONSE
{
"run": {
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
},
"baseline_content": "string"
}

Create visual review runs auto approve

CLI auto-approve: approve all and return baseline YAML for local write.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/auto-approve
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/visual_review/runs/:id/auto-approve/

Example response

Status 200
RESPONSE
{
"run": {
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
},
"baseline_content": "string"
}

Create visual review runs auto approve

CLI auto-approve: approve all and return baseline YAML for local write.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/auto-approve
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/visual_review/runs/:id/auto-approve/

Example response

Status 200
RESPONSE
{
"run": {
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
},
"baseline_content": "string"
}

Create visual review runs complete

Complete a run: detect removals, verify uploads, trigger diff processing.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/complete
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/visual_review/runs/:id/complete/

Example response

Status 200
RESPONSE
{
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
}

Create visual review runs complete

Complete a run: detect removals, verify uploads, trigger diff processing.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/complete
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/visual_review/runs/:id/complete/

Example response

Status 200
RESPONSE
{
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
}

Create visual review runs recompute

Re-evaluate quarantine and counts, update commit status, and optionally rerun the CI job.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/recompute
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/visual_review/runs/:id/recompute/

Example response

Status 200
RESPONSE
{
"run": {
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
},
"counts_changed": true,
"unresolved": 0,
"ci_rerun_triggered": true,
"ci_rerun_error": "string"
}

Create visual review runs recompute

Re-evaluate quarantine and counts, update commit status, and optionally rerun the CI job.

Required API key scopes

visual_review:write

Path parameters

  • id
    string

Response


Example request

POST /api/projects/:project_id/visual_review/runs/:id/recompute
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/visual_review/runs/:id/recompute/

Example response

Status 200
RESPONSE
{
"run": {
"approved_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"repo_id": "59e69ce7-60be-4408-9333-ec12132fc070",
"status": "string",
"run_type": "string",
"commit_sha": "string",
"branch": "string",
"pr_number": 0,
"approved": true,
"approved_at": "2019-08-24T14:15:22Z",
"summary": {
"total": 0,
"changed": 0,
"new": 0,
"removed": 0,
"unchanged": 0,
"unresolved": 0,
"tolerated_matched": 0
},
"error_message": "string",
"created_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"is_stale": true,
"superseded_by_id": "6b86439a-ba84-4137-9924-cffddd52399a",
"metadata": {}
},
"counts_changed": true,
"unresolved": 0,
"ci_rerun_triggered": true,
"ci_rerun_error": "string"
}

List all visual review runs snapshots

Get all snapshots for a run with diff results.

Required API key scopes

visual_review:read

Path parameters

  • id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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": [
{
"current_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"baseline_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"diff_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"reviewed_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"identifier": "string",
"result": "string",
"classification_reason": "string",
"diff_percentage": 0.1,
"diff_pixel_count": 0,
"review_state": "string",
"reviewed_at": "2019-08-24T14:15:22Z",
"approved_hash": "string",
"tolerated_hash_id": "7019d9c2-0d1d-41e9-a8a2-90206607b139",
"is_quarantined": true,
"metadata": {}
}
]
}

List all visual review runs snapshots

Get all snapshots for a run with diff results.

Required API key scopes

visual_review:read

Path parameters

  • id
    string

Query parameters

  • limit
    integer
  • offset
    integer

Response


Example request

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

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": [
{
"current_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"baseline_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"diff_artifact": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"content_hash": "string",
"width": 0,
"height": 0,
"download_url": "string"
},
"reviewed_by": {
"id": 0,
"first_name": "string",
"email": "string"
},
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"identifier": "string",
"result": "string",
"classification_reason": "string",
"diff_percentage": 0.1,
"diff_pixel_count": 0,
"review_state": "string",
"reviewed_at": "2019-08-24T14:15:22Z",
"approved_hash": "string",
"tolerated_hash_id": "7019d9c2-0d1d-41e9-a8a2-90206607b139",
"is_quarantined": true,
"metadata": {}
}
]
}

Community questions

Questions about this page? or post a community question.