As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.

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 6 Next »

/rest/{version}/defects/search


Descriptor

Value

HTTP Method

POST

Description

Returns a filtered list of defects.

Required Permission

Read Access (Any Role)

Version Introduced2.7.3


Request Header Parameters

Parameter

Value

Required

Description

Accept

String

Yes

A value of ‘application/json’ must be provided.

AuthorizationAPIKEY {apiKey}YesAPI being used to execute API call.

Request POST Data Parameters

Parameter

Value Type

Req.

Description

paging

Integer

No

By default defects are displayed 10 to a page. Changing this value will allow user to display the next set of 10 defects and so on.

maxResults

Integer

No

Maximum number of defects to be returned. By default this method will only return up to 10 defects.

daysOld

Integer

No

Age in days of defect(s).

hoursOld

Integer

No

Age in hours of defect(s).

agingModifier

String

No

Applies modifier to either daysOld or hoursOld parameter. Accepted values are "less" and "more".

agingDateType

String

No

Entering "created" will apply the search to the defect created date. Entering "status" will apply the search to the defect status updated date.

startDate

Date

No

Lower bound on defect dates. Format: yyyy-MM-dd or Epoch time (in milliseconds).

endDate

Date

No

Upper bound on defect dates. Format: yyyy-MM-dd or Epoch time (in milliseconds).

statusUpdatedStartDate

Date

No

Lower bound on defect updated dates. Format: yyyy-MM-dd or Epoch time (in milliseconds).

statusUpdatedEndDate

Date

No

Upper bound on defect updated dates. Format: yyyy-MM-dd or Epoch time (in milliseconds).

defects

List

No

Serialized list of defects by id or nativeId. Example: defects[0].id=1 or defects[0].nativeId=THREAD-1983

applicationDefectTracker

List

No

Serialized list of application defect trackers by id, projectName or projectId. Example: applicationDefectTracker[0].id=1 or applicationDefectTracker[0].projectName=ThreadFix or applicationDefectTracker[0].projectId = 1

statuses

List

No

Serialized list of defects by status. Example: statuses[0].status=Open

showOpenBooleanNo

Flag to show only open defects.

showClosed

Boolean

No

Flag to show only closed defects.

Sample Call:


curl -H 'Accept: application/json' -H 'Authorization: APIKEY {apiKey}' -X POST --data 'showOpen=1' http://localhost:8080/threadfix/rest/latest/defects/search

Sample Output:


{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": [
        {
            "id": 40,
            "nativeId": "THREAD-18653",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18653",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 41,
            "nativeId": "THREAD-18654",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18654",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 42,
            "nativeId": "THREAD-18655",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18655",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 43,
            "nativeId": "THREAD-18656",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18656",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 44,
            "nativeId": "THREAD-18657",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18657",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 45,
            "nativeId": "THREAD-18658",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18658",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 46,
            "nativeId": "THREAD-18659",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18659",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 47,
            "nativeId": "THREAD-18660",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18660",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 48,
            "nativeId": "THREAD-18661",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18661",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        },
        {
            "id": 49,
            "nativeId": "THREAD-18662",
            "status": "Open",
            "category": null,
            "defectURL": "https://threadfix.atlassian.net/browse/THREAD-18662",
            "defectTrackerName": "JIRA - ThreadFix",
            "opened": true
        }
    ]
}



  • No labels