Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

DescriptionGet a list of issues

URL

/api/issues/search

HTTP MethodGET
Response Formatsjson | xml

Security

Requires User role Browse permission on project(s)

Available sinceVersion 3.6

...

Parameter

Description

Required

Default Value

Example Value

issues

Comma-separated list of issue keys.

No

None

5bccd6e8-f525-43a2-8d76-fcb13dde79ef
severities

Comma-separated list of severities.

Possible values: BLOCKER | CRITICAL | MAJOR | MINOR | INFO

NoNoneBLOCKER,CRITICAL
statuses

Comma-separated list of statuses.

Possible values: OPEN | REOPENED | CONFIRMED | RESOLVED | CLOSED

NoNoneOPEN,REOPENED
resolutions

Comma-separated list of resolutions.

Possible values: FIXED,REMOVED,FALSE-POSITIVE

NoNoneFIXED,REMOVED
resolved

To match resolved or unresolved issues.

Possible values: true | false

NoNonetrue
componentsTo retrieve issues associated to a specific list of components (comma-separated list of component keys). Note that if you set the value to a project key, only issues associated to this project are retrieved. Issues associated to its sub-components (such as files, packages, etc.) are not retrieved. See also componentRoots.NoNoneorg.apache.struts:struts:org.apache.struts.Action
componentRootsTo retrieve issues associated to a specific list of components and their sub-components (comma-separated list of component keys). Views are not supported.NoNoneorg.apache.struts:struts
rules

Comma-separated list of coding rule keys.

Format is <repository>:<rule>

NoNonesquid:AvoidCycles
actionPlansComma-separated list of action plan keys (not names).NoNone3f19de90-1521-4482-a737-a311758ff513
planned

To retrieve issues associated to an action plan or not.

Possible values: true | false

NoNonetrue
reportersComma-separated list of reporter logins.NoNoneadmin
assigneesComma-separated list of assignee logins.NoNoneadmin,usera
assigned

To retrieve assigned or unassigned issues.

Possible values: true | false

NoNonetrue
createdAfter

To retrieve issues created after the given date (inclusive).

Format: date or datetime ISO formats

NoNone2013-05-01 (or 2013-05-01T13:00:00+0100)
createdBefore

To retrieve issues created before the given date (exclusive).

Format: date or datetime ISO formats

NoNone2013-05-01 (or 2013-05-01T13:00:00+0100)
pageSize

Maximum number of results per page.

Default value: 100 (except when the 'components' parameter is set, value is set to "-1" in this case)

If set to "-1", the max possible value is used.

NoNone50
pageIndex

Index of the selected page

Default value: 1

NoNone2
format

Response format can be set through:

  • Parameter format: xml | json
  • Or the 'Accept' property in the HTTP header:
    • Accept:text/xml
    • Accept:application/json
If nothing is set, json is used.
NoNonejson

...

DescriptionAssign/Unassign an issue

URL

/api/issues/assign

HTTP MethodPOST

Security

Requires authentication and User role Browse permission on project

Available sinceVersion 3.6

...

DescriptionAdd a comment

URL

/api/issues/add_comment

HTTP MethodPOST

Security

Requires authentication and User role Browse permission on project
Available sinceVersion 3.6

...

DescriptionDelete a comment

URL

/api/issues/delete_comment

HTTP MethodPOST

Security

Requires authentication and User role Browse permission on project
Available sinceVersion 3.6

...

DescriptionChange severity

URL

/api/issues/set_severity

HTTP MethodPOST

Security

Requires authentication and User role Browse permission on project
Available sinceVersion 3.6

...

DescriptionPlan/Unplan an issue

URL

/api/issues/plan

HTTP MethodPOST

Security

Requires authentication and User role Browse permission on project
Available sinceVersion 3.6

...

DescriptionDo workflow transition on an issue

URL

/api/issues/do_transition

HTTP MethodPOST

Security

Requires authentication and User role Browse permission on project
Available sinceVersion 3.6

...

DescriptionGet Possible Workflow Transitions for an Issue

URL

/api/issues/transitions

HTTP MethodGET

Security

Requires User role Browse permission on the project

Available sinceVersion 3.6

...

DescriptionCreate a manual issue

URL

/api/issues/create

HTTP MethodPOST

Security

Requires authentication and User role Browse permission on project

Available sinceVersion 3.6

...

Use CaseExample Request

The 'admin' user creates a new manual issue:

  • Component: commons-io:commons-io:org.apache.commons.io.filefilter.OrFileFilter
  • Manual rule: manual:performance
  • Line: 2
  • Severity: BLOCKER
  • Description: blabla

curl -X POST -v -u admin:admin 'http://localhost:9000/api/issues/create?component=commons-io:commons-io:org.apache.commons.io.filefilter.OrFileFiltermyproject:myfile&rule=manual:performance&line=2&severity=BLOCKER&message=blabla'

...