Open
Conversation
Contributor
Author
Full API Reference with ExamplesIssue Categoriesproject = client.get_project("<PROJECT_ID>")
# Create
category = project.create_issue_category(
name="Quality",
description="Quality-related issues",
)
# List all
categories = project.get_issue_categories()
# Update
category = category.update(name="Renamed", description="New description")
# Delete
category.delete()Issuesfrom labelbox import IssueStatus, ImageIssuePosition, VideoIssuePosition, VideoFrameRange
# Create -- minimal
issue = project.create_issue(
content="General quality issue",
data_row_id="<DATA_ROW_ID>",
)
# Create -- with label, category, and position
issue = project.create_issue(
content="Bounding box is misaligned",
data_row_id="<DATA_ROW_ID>",
label_id="<LABEL_ID>",
category_id=category.id,
position=ImageIssuePosition(x=100, y=200),
)
# Also accepts DataRow/Label/IssueCategory objects directly
issue = project.create_issue(
content="Using objects instead of IDs",
data_row_id=data_row, # DataRow object
label_id=label, # Label object
category_id=category, # IssueCategory object
)
# Fetch with filters (returns PaginatedCollection)
for issue in project.get_issues(status=IssueStatus.OPEN):
print(issue.friendly_id, issue.content)
# Other available filters
project.get_issues(
data_row_id="<DATA_ROW_ID>",
category_id="<CATEGORY_ID>",
created_by_ids=["<USER_ID>"],
content="search text",
)
# Fetch single issue
issue = project.get_issue("<ISSUE_ID>")
# Update (only provided fields are changed)
issue = issue.update(content="Updated text")
issue = issue.update(category_id="<NEW_CATEGORY_ID>")
# Resolve / Reopen
issue = issue.resolve()
issue = issue.reopen()
# Lazy-loaded related objects (each makes an API call)
data_row = issue.data_row() # Optional[DataRow]
label = issue.label() # Optional[Label]
category = issue.category() # Optional[IssueCategory]
# Delete single
issue.delete()
# Bulk delete
project.delete_issues(["<ISSUE_ID_1>", "<ISSUE_ID_2>"])Comments# Create
comment = issue.create_comment(content="I agree, this needs fixing")
# List all comments on an issue
comments = issue.comments()
# Update
comment = comment.update(content="Revised comment")
# Delete
comment.delete()Video Position Variants# Single frame
VideoIssuePosition(frames=[
VideoFrameRange(start=5, end=5, x=100, y=200)
])
# Contiguous range (stationary pin)
VideoIssuePosition(frames=[
VideoFrameRange(start=5, end=11, x=450, y=300)
])
# Contiguous range (moving pin)
VideoIssuePosition(frames=[
VideoFrameRange(start=5, end=11, x=450, y=300, end_x=500, end_y=350)
])
# Multiple separated ranges
VideoIssuePosition(frames=[
VideoFrameRange(start=5, end=11, x=450, y=300),
VideoFrameRange(start=20, end=25, x=100, y=100),
]) |
7663610 to
d295441
Compare
9d55f6d to
2282f98
Compare
2282f98 to
2bcc661
Compare
2bcc661 to
a8fcd12
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
a8fcd12 to
c6f03f4
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| result = self._client.execute( | ||
| query_str, {"projectId": self._project_id} | ||
| ) | ||
| raw_list = result.get("project", {}).get("issueCategories", []) |
There was a problem hiding this comment.
Missing experimental flag on category queries
High Severity
Issue.category() and Project.get_issue_categories() call client.execute(...) without experimental=True, while the rest of the new Issues API uses experimental=True. If the backend gates these GraphQL fields behind the experimental flag, these methods will fail at runtime even though the other issue operations work.
Additional Locations (1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Adds full programmatic support for Issues, Comments, and Issue Categories. Issues can be pinned to specific data row locations (Image, PDF, Text, Video).
Usage Example
This is the standard flow for most users:
Deep Dive: All Supported Positions
Click to see exhaustive examples for PDF, Text, and Video
Implementation Note
Used Pydantic (
_CamelCaseMixin) instead ofDbObjectbecause the backend GraphQL mutations for Issues use typed input objects incompatible with the legacy ORM's auto-generation.Fixes # (issue)
Type of change
Please delete options that are not relevant.
All Submissions
New Feature Submissions
Changes to Core Features
Note
Medium Risk
Adds new GraphQL mutation/query flows (mostly
experimental=True) and new typed position serialization/deserialization, so failures would primarily be API/compatibility issues rather than affecting existing flows.Overview
Adds first-class Issue Management APIs to the Python SDK. Projects can now
create_issue,get_issues(cursor-paginated with filters),get_issue, anddelete_issues, whileIssueobjects supportupdate,resolve/reopen,delete, and comment CRUD (create_comment,comments,Comment.update,Comment.delete).Introduces typed issue pinning via new
IssuePositionmodels for image/PDF/text/video (with serialization + deserialization), plusIssueCategoryCRUD and new Sphinx docs and exports inlabelbox.__init__. Includes comprehensive unit + integration test coverage for the new GraphQL-backed workflows (all markedexperimental=True).Written by Cursor Bugbot for commit c6f03f4. This will update automatically on new commits. Configure here.