# Visual regression

Visual regression reference screenshots

## List visual regression reference screenshots

> Returns a list of visual regression reference screenshots.

```json
{"openapi":"3.1.0","info":{"title":"BugBug.io Public API","version":"v2"},"tags":[{"name":"Visual regression","description":"Visual regression reference screenshots"}],"security":[{"tokenAuth":[]},{"Bearer":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"PaginatedV2VisualRegressionRefScreenshotList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshot"}}}},"V2VisualRegressionRefScreenshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"stepId":{"type":"string","format":"uuid","readOnly":true},"projectArtifactId":{"type":["string","null"],"format":"uuid","readOnly":true},"screenshotUrl":{"type":["string","null"],"readOnly":true},"browserName":{"type":["string","null"],"readOnly":true},"osName":{"type":["string","null"],"readOnly":true},"screenSizeType":{"type":["string","null"],"readOnly":true},"runProfileId":{"type":["string","null"],"format":"uuid","readOnly":true},"runProfileName":{"type":"string","readOnly":true},"runMode":{"enum":["server","local","recording",null],"type":["string","null"],"description":"* `server` - cloud\n* `local` - local\n* `recording` - recording","readOnly":true},"created":{"type":"string","format":"date-time","readOnly":true},"modified":{"type":"string","format":"date-time","readOnly":true}},"required":["browserName","created","id","modified","osName","projectArtifactId","runMode","runProfileId","runProfileName","screenSizeType","screenshotUrl","stepId"]}}},"paths":{"/api/v2/visual-regression/reference-screenshots/":{"get":{"operationId":"v2_visual_regression_reference_screenshots_list","description":"Returns a list of visual regression reference screenshots.","summary":"List visual regression reference screenshots","parameters":[{"name":"page","required":false,"in":"query","description":"A page number within the paginated result set.","schema":{"type":"integer"}},{"name":"page_size","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"in":"query","name":"step_id","schema":{"type":"string"},"description":"Filter reference screenshots by step ID.","required":true}],"tags":["Visual regression"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedV2VisualRegressionRefScreenshotList"}}},"description":""},"401":{"description":"Authentication credentials were missing or invalid."}}}}}}
```

## Create visual regression reference screenshot

> Creates a new visual regression reference screenshot.

```json
{"openapi":"3.1.0","info":{"title":"BugBug.io Public API","version":"v2"},"tags":[{"name":"Visual regression","description":"Visual regression reference screenshots"}],"security":[{"tokenAuth":[]},{"Bearer":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"V2VisualRegressionRefScreenshotCreate":{"type":"object","properties":{"stepId":{"type":"string","format":"uuid"},"screenshot":{"type":"string","format":"uri"},"browserName":{"type":["string","null"]},"osName":{"type":["string","null"]},"screenSizeType":{"enum":["desktop","mobile","custom","",null],"type":["string","null"],"description":"* `desktop` - Desktop\n* `mobile` - Mobile\n* `custom` - Custom"},"runProfileId":{"type":["string","null"],"format":"uuid"},"runMode":{"enum":["server","local","recording","",null],"type":["string","null"],"description":"* `server` - cloud\n* `local` - local\n* `recording` - recording"}},"required":["screenshot","stepId"]},"V2VisualRegressionRefScreenshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"stepId":{"type":"string","format":"uuid","readOnly":true},"projectArtifactId":{"type":["string","null"],"format":"uuid","readOnly":true},"screenshotUrl":{"type":["string","null"],"readOnly":true},"browserName":{"type":["string","null"],"readOnly":true},"osName":{"type":["string","null"],"readOnly":true},"screenSizeType":{"type":["string","null"],"readOnly":true},"runProfileId":{"type":["string","null"],"format":"uuid","readOnly":true},"runProfileName":{"type":"string","readOnly":true},"runMode":{"enum":["server","local","recording",null],"type":["string","null"],"description":"* `server` - cloud\n* `local` - local\n* `recording` - recording","readOnly":true},"created":{"type":"string","format":"date-time","readOnly":true},"modified":{"type":"string","format":"date-time","readOnly":true}},"required":["browserName","created","id","modified","osName","projectArtifactId","runMode","runProfileId","runProfileName","screenSizeType","screenshotUrl","stepId"]}}},"paths":{"/api/v2/visual-regression/reference-screenshots/":{"post":{"operationId":"v2_visual_regression_reference_screenshots_create","description":"Creates a new visual regression reference screenshot.","summary":"Create visual regression reference screenshot","tags":["Visual regression"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshotCreate"}},"application/json":{"schema":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshotCreate"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshot"}}},"description":""},"400":{"description":"Request body failed validation."},"401":{"description":"Authentication credentials were missing or invalid."}}}}}}
```

## Retrieve visual regression reference screenshot

> Returns a single visual regression reference screenshot.

```json
{"openapi":"3.1.0","info":{"title":"BugBug.io Public API","version":"v2"},"tags":[{"name":"Visual regression","description":"Visual regression reference screenshots"}],"security":[{"tokenAuth":[]},{"Bearer":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"V2VisualRegressionRefScreenshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"stepId":{"type":"string","format":"uuid","readOnly":true},"projectArtifactId":{"type":["string","null"],"format":"uuid","readOnly":true},"screenshotUrl":{"type":["string","null"],"readOnly":true},"browserName":{"type":["string","null"],"readOnly":true},"osName":{"type":["string","null"],"readOnly":true},"screenSizeType":{"type":["string","null"],"readOnly":true},"runProfileId":{"type":["string","null"],"format":"uuid","readOnly":true},"runProfileName":{"type":"string","readOnly":true},"runMode":{"enum":["server","local","recording",null],"type":["string","null"],"description":"* `server` - cloud\n* `local` - local\n* `recording` - recording","readOnly":true},"created":{"type":"string","format":"date-time","readOnly":true},"modified":{"type":"string","format":"date-time","readOnly":true}},"required":["browserName","created","id","modified","osName","projectArtifactId","runMode","runProfileId","runProfileName","screenSizeType","screenshotUrl","stepId"]}}},"paths":{"/api/v2/visual-regression/reference-screenshots/{id}/":{"get":{"operationId":"v2_visual_regression_reference_screenshots_retrieve","description":"Returns a single visual regression reference screenshot.","summary":"Retrieve visual regression reference screenshot","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this visual regression ref screenshot.","required":true}],"tags":["Visual regression"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshot"}}},"description":""},"401":{"description":"Authentication credentials were missing or invalid."},"404":{"description":"Resource not found."}}}}}}
```

## Update visual regression reference screenshot

> Updates a visual regression reference screenshot.

```json
{"openapi":"3.1.0","info":{"title":"BugBug.io Public API","version":"v2"},"tags":[{"name":"Visual regression","description":"Visual regression reference screenshots"}],"security":[{"tokenAuth":[]},{"Bearer":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}},"schemas":{"V2VisualRegressionRefScreenshotUpdate":{"type":"object","properties":{"screenshot":{"type":"string","format":"uri"}},"required":["screenshot"]},"V2VisualRegressionRefScreenshot":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"stepId":{"type":"string","format":"uuid","readOnly":true},"projectArtifactId":{"type":["string","null"],"format":"uuid","readOnly":true},"screenshotUrl":{"type":["string","null"],"readOnly":true},"browserName":{"type":["string","null"],"readOnly":true},"osName":{"type":["string","null"],"readOnly":true},"screenSizeType":{"type":["string","null"],"readOnly":true},"runProfileId":{"type":["string","null"],"format":"uuid","readOnly":true},"runProfileName":{"type":"string","readOnly":true},"runMode":{"enum":["server","local","recording",null],"type":["string","null"],"description":"* `server` - cloud\n* `local` - local\n* `recording` - recording","readOnly":true},"created":{"type":"string","format":"date-time","readOnly":true},"modified":{"type":"string","format":"date-time","readOnly":true}},"required":["browserName","created","id","modified","osName","projectArtifactId","runMode","runProfileId","runProfileName","screenSizeType","screenshotUrl","stepId"]}}},"paths":{"/api/v2/visual-regression/reference-screenshots/{id}/":{"put":{"operationId":"v2_visual_regression_reference_screenshots_update","description":"Updates a visual regression reference screenshot.","summary":"Update visual regression reference screenshot","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this visual regression ref screenshot.","required":true}],"tags":["Visual regression"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshotUpdate"}},"application/json":{"schema":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshotUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V2VisualRegressionRefScreenshot"}}},"description":""},"400":{"description":"Request body failed validation."},"401":{"description":"Authentication credentials were missing or invalid."},"404":{"description":"Resource not found."}}}}}}
```

## Delete visual regression reference screenshot

> Deletes a visual regression reference screenshot.

```json
{"openapi":"3.1.0","info":{"title":"BugBug.io Public API","version":"v2"},"tags":[{"name":"Visual regression","description":"Visual regression reference screenshots"}],"security":[{"tokenAuth":[]},{"Bearer":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token-based authentication with required prefix \"Token\""}}},"paths":{"/api/v2/visual-regression/reference-screenshots/{id}/":{"delete":{"operationId":"v2_visual_regression_reference_screenshots_destroy","description":"Deletes a visual regression reference screenshot.","summary":"Delete visual regression reference screenshot","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this visual regression ref screenshot.","required":true}],"tags":["Visual regression"],"responses":{"204":{"description":"No response body"},"401":{"description":"Authentication credentials were missing or invalid."},"404":{"description":"Resource not found."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bugbug.io/public-api-reference/visual-regression.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
