Models¶
All API responses are deserialized into Pydantic v2 models with full type annotations.
Base Classes¶
JiraModel¶
All models inherit from JiraModel, which extends Pydantic’s BaseModel with:
extra='allow'– unknown fields from the API are preserved inmodel_extrapopulate_by_name=True– fields can be accessed by either their Python name or JSON alias
PaginatedResponse¶
Base class for paginated API responses. Provides:
Field |
Type |
Description |
|---|---|---|
|
|
Starting index (alias: |
|
|
Page size (alias: |
|
|
Total number of results |
|
|
Whether this is the last page (alias: |
Field Naming¶
Jira’s API returns camelCase JSON. Pydantic aliases map these to snake_case Python attributes:
issue = client.issues.get('PROJ-123')
# Python attributes are snake_case
issue.fields.fix_versions # not fixVersions
issue.fields.status_category # not statusCategory
user = client.users.myself()
user.display_name # not displayName
user.email_address # not emailAddress
user.account_id # not accountId
Accessing Custom Fields¶
Since models use extra='allow', any field the API returns that isn’t explicitly modeled is preserved:
issue = client.issues.get('PROJ-123')
# Access custom fields via model_extra
raw = issue.fields.model_extra
custom_value = raw.get('customfield_10042')
Core Models¶
Issue Models¶
Model |
Description |
|---|---|
|
Complete issue with key, id, fields, changelog, transitions |
|
All standard issue fields (summary, status, assignee, etc.) |
|
Issue status with category |
|
Status category (To Do, In Progress, Done) |
|
Issue priority |
|
Issue type (Bug, Task, Story, etc.) |
|
Issue resolution (Fixed, Won’t Fix, etc.) |
|
Workflow transition with target status |
|
Issue change history container |
|
Single changelog entry with author and items |
|
Individual field change (from -> to) |
|
Issue attachment with metadata |
|
Issue voting information |
|
Issue watcher information |
|
Time tracking worklog entry |
|
External issue link |
|
Entity property key reference |
Project Models¶
Model |
Description |
|---|---|
|
Project with key, name, lead, type, category |
|
Project category metadata |
User Models¶
Model |
Description |
|---|---|
|
User with account_id, display_name, email, avatar |
|
Avatar URLs for different sizes (16x16 to 48x48) |
Search Models¶
Model |
Description |
|---|---|
|
Paginated search response with issues list |
Issue Link Models¶
Model |
Description |
|---|---|
|
Link between two issues |
|
Link type definition (inward/outward names) |
|
Linked issue reference |
Version Models¶
Model |
Description |
|---|---|
|
Project version with release dates and status |
Component Models¶
Model |
Description |
|---|---|
|
Project component with lead and assignee |
|
Component issue count |
Filter Models¶
Model |
Description |
|---|---|
|
Saved JQL filter with owner and permissions |
|
Paginated filter list |
|
Filter share permission entry |
Dashboard Models¶
Model |
Description |
|---|---|
|
Dashboard with owner and permissions |
|
Paginated dashboard list |
|
Dashboard gadget/widget |
Group Models¶
Model |
Description |
|---|---|
|
User group |
|
Paginated group members list |
Role Models¶
Model |
Description |
|---|---|
|
Project role with actors |
|
Role actor (user or group) |
Permission Models¶
Model |
Description |
|---|---|
|
Permission scheme configuration |
|
Permission grant entry |
Priority / Resolution / Status Detail Models¶
Model |
Description |
|---|---|
|
Detailed priority with status color and default flag |
|
Paginated priority list |
|
Detailed resolution with default flag |
|
Paginated resolution list |
|
Detailed status with icon and scope |
|
Paginated status list |
Field Models¶
Model |
Description |
|---|---|
|
Field configuration (custom, orderable, searchable, etc.) |
|
Paginated field list |
|
Detailed issue type with hierarchy level and scope |
Workflow Models¶
Model |
Description |
|---|---|
|
Workflow definition with statuses and transitions |
|
Paginated workflow list |
|
Workflow scheme configuration |
|
Status within a workflow |
Screen Models¶
Model |
Description |
|---|---|
|
Screen definition |
|
Paginated screen list |
|
Screen tab |
|
Field on a screen tab |
|
Screen scheme configuration |
|
Paginated screen scheme list |
Notification Scheme Models¶
Model |
Description |
|---|---|
|
Notification scheme configuration |
|
Paginated notification scheme list |
Comment Models¶
Model
Description
CommentIssue comment with author, body (ADF), timestamps
VisibilityComment visibility restrictions