Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The API wrapper allows you to interact with other aspects of the Jira instance.

Usage

Below you can check examples of usage for this class.

# Issue Operations

## Search for Issues
issues = api.search_issues("your jql here")

## Edit an Issue
api.edit_issue("EFJ-1", {"fieldkey": newvalue})

## Create an Issue
api.create_issue(project_key_or_id: int or str, issuetype: int or str, summary, **kwargs)

# General API Usage

## Get Instance Info
fields = api.fields
projects = api.projects
issuetypes = api.issuetypes

## General API Requests
r = api.get(url)
r = api.put(url: str, data: dict)
r = api.post(url: str, data: dict)

# Project Management

## Interact with Projects
project = api.project("ABC")
project.set_lead("lead account id")
project.set_name("New Name")
project.update(name="New Name", description="New Description")
project.properties
project.set_property(key, value)
project.get_property(key)
project.set_permission_scheme(permission_scheme_id)
project.delete()

# Screen and Field Management

## Interact with Screen Schemes
screen_schemes = api.screenschemes
screen_schemes.create(name, description)
screen_schemes.update(ss_id, name="", description="")
screen_schemes = screen_schemes.get_all()

## Interact with Screens
screens = api.screens
screens.create(name, description)
screens.update(name='new name', description="new description")
screens = screens.get_all()

## Interact with Fields
fields = api.fields
fields.create("name", "fieldtype", description="optional")
fields.update(fieldId, name="new name", description="new description")
field = api.fields.by_name("Summary")
field.key # summary
field = api.fields.by_key("customfield_10000")
field.name # Story Points 
api.fields.delete(field.key)

# Issue Type Management

## Interact with Issue Types
issuetypes = api.issuetypes
issuetypes.create("name", "description")

  • No labels