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.

Create Defect Tracker - API

/rest/{version}/defectTrackers/new


Descriptor

Value

HTTP Method

POST

Description

Create a new Defect Tracker

Required Permission

Manage Defect Trackers

Version Introduced2.4.0
Changes in 2.5.1Added "authType" field to response.
Changes in 2.7.9.1Added support for Rally workspaces.
Changes in 2.8Added support for TFS collections.


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 tracker to configure.  You can get the possible values with /rest/defectTrackers/types.

name

String

Yes

Name to give the Defect Tracker configuration.

url

String

Yes

The URL for the tracker.

defaultUsername

String

No

A default username that can be used when attaching the tracker to an application.

defaultPassword

String

No

A default password to use with the default username.

defaultProductName

String

No

A default project that can be used when attaching the tracker to an application.  This requires a default username and password to be provided.

defaultRallyWorkspaceStringNoA default workspace that can be used when attaching the tracker to an application. This requires a default username and password to be provided. Only supported by Rally defect tracker.
tfsDefaultCollectionStringNoA default collection that can be used when attaching the tracker to an application. This requires a default username and password to be provided. Only supported by TFS defect tracker.


Sample Call:

curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {apiKey}" -X POST --data 'defectTrackerTypeId=3&name=Created By REST&url=https://yourproject.atlassian.net/' http://localhost:8080/threadfix/rest/latest/defectTrackers/new


Sample Output:


{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": {
        "id": 13,
        "name": " Created By REST ",
        "url": "https://yourproject.atlassian.net/",
        "defaultUsername": "username",
        "defaultProductName": null,
        "defectTrackerType": {
            "id": 3,
            "name": "JIRA",
            "urlPlaceholder": "https://yourproject.atlassian.net",
            "authType":"usernamePassword"
        },
        "defaultDefectProfiles": null,
        "applicationDefectTrackers": []
    }
}

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.