Expand description
Rust interface for Jira API.
This crate provides both synchronous and asynchronous clients for interacting with Jira’s REST API.
§Features
- Synchronous API (default)
- Asynchronous API (with the
async
feature) - Support for multiple authentication methods:
- Anonymous
- Basic authentication (username/password or Personal Access Token)
- Bearer token authentication
- Cookie-based authentication (JSESSIONID)
§Examples
§Synchronous usage
use gouqi::{Credentials, Jira};
let credentials = Credentials::Basic("username".to_string(), "password".to_string());
let jira = Jira::new("https://jira.example.com", credentials).unwrap();
// Get information about the current session
let session = jira.session().unwrap();
println!("Logged in as: {}", session.name);
// Search for issues
let results = jira.search().list("project = DEMO", &Default::default()).unwrap();
println!("Found {} issues", results.total);
§Asynchronous usage (with the async
feature)
use gouqi::{Credentials, r#async::Jira};
let credentials = Credentials::Basic("username".to_string(), "password".to_string());
let jira = Jira::new("https://jira.example.com", credentials)?;
// Get information about the current session
let session = jira.session().await?;
println!("Logged in as: {}", session.name);
// Search for issues
let results = jira.search().list("project = DEMO", &Default::default()).await?;
println!("Found {} issues", results.total);
Re-exports§
pub use sync::Jira;
pub use crate::attachments::*;
pub use crate::cache::*;
pub use crate::components::*;
pub use crate::config::*;
pub use crate::core::*;
pub use crate::issues::*;
pub use crate::metrics::*;
pub use crate::observability::*;
pub use crate::projects::*;
pub use crate::relationships::*;
pub use crate::transitions::*;
pub use crate::boards::*;
pub use crate::mcp::*;
pub use crate::sprints::*;
pub use crate::versions::*;
Modules§
- async
- Asynchronous API for interacting with Jira.
- attachments
- Interfaces for accessing and managing attachments
- boards
- Interfaces for accessing and managing boards
- cache
- Response caching system
- components
- Interfaces for accessing and managing components
- config
- Configuration management for gouqi Jira client
- core
- Core shared functionality between sync and async implementations
- env
- Environment variable configuration loading
- issues
- Interfaces for accessing and managing issues
- mcp
- MCP (Model Context Protocol) utilities for integrating Jira entities as MCP resources.
- metrics
- Metrics collection and monitoring
- observability
- Comprehensive observability infrastructure
- projects
- Interfaces for accessing and managing projects
- relationships
- Issue relationship management and graph structures
- resolution
- Interfaces for accessing and managing resolutions
- sprints
- Interfaces for accessing and managing sprints
- sync
- transitions
- Interfaces for accessing and managing transition
- versions
Structs§
- Async
Search - Async version of the Search interface
- Attachment
- Changelog
- Comment
- Comments
- Create
Project - Errors
- Represents an general jira error response
- Field
Schema - Custom field schema definition for Jira fields
- History
- History
Item - Issue
- Represents a single jira issue
- Issue
Link - Represents link relationship between issues
- Issue
Type - Jira
Builder - Enhanced builder for Jira client configuration
- Link
Type - Represents type of issue relation
- Priority
- Project
- Project
Category - Project
Component - Project
Role - Project
Search Options - Project
Search Results - Resolution
- Role
Actor - Search
- Search interface
- Search
Options - Options availble for search
- Search
Options Builder - A builder interface for search option. Typically this is initialized with SearchOptions::builder()
- Search
Results - Session
- Status
- Time
Tracking - Transition
- Transition
Option - Transition
Options - Contains list of options an issue can transitions through
- Transition
To - Transition
Trigger Options - Transition
Trigger Options Builder - Update
Project - User
- V3Search
Results - V3 Search Results format for the new /rest/api/3/search/jql endpoint
- Version
- Version
Creation Body - Version
Move After Body - Version
Update Body - Visibility
Enums§
- Config
Template - Predefined configuration templates
- Error
- An enumeration over potential errors that may happen when sending a request to jira