Versions Compared

Key

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

/rest/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:

Code Block
languagesql
themeEclipse
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:


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


Page Tree
rootDefect Trackers API