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.

List Defect Tracker Projects - API

/rest/{version}/defectTrackers/projects


Descriptor

Value

HTTP Method

POST (for security reasons)

Description

Using provided URL and credentials, get a list of projects for a Defect Tracker.

Required Permission

Manage Defect Trackers

Version Introduced2.6


Request Header Parameters

Parameter

Value

Required

Description

Accept

String

Yes

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


Request POST Data Parameters

Parameter

Value

Required

Description

defectTrackerTypeId

Integer

Yes

The type of defect tracker.  You can get the possible values with /rest/defectTrackers/types.

url

String

Yes

The URL for the tracker.

username

String

Yes*

The username used to request Defect Tracker projects. *Some defect trackers use an API Key instead

password

String

Yes*

The password for the username. *Not required if the defect tracker uses an API Key

apiKeyStringYes*The API Key used to request Defect Tracker projects. *Some defect trackers use a username and password instead


Sample Call:

curl -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" -X POST --data 'defectTrackerTypeId=3&url=https://yourproject.atlassian.net&username=validUser&password=validPassword' http://localhost:8080/threadfix/rest/latest/defectTrackers/projects


Sample Output:


{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": {
        "projects": [
            {
                "name": "Project with \"Quotes\""
            },
            {
                "name": "YourProjectHere"
            },
            {
                "name": "Another Project"
            },
            {
                "name": "test"
            }
        ]
    }
}

www.threadfix.it | www.coalfire.com
Copyright © 2024 Coalfire. All rights reserved.

This Information Security Policy is CoalFire - Public: Distribution of this material is not limited.